mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
parser: only use 32 bit next/check tables if required
If the state machine does not requires more than 2^16 states use the dfa16 encoding for next/check tables to keep the dfa size small. Bug: https://gitlab.com/apparmor/apparmor/-/issues/419 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
f86fda02f5
commit
012dcb6489
@ -489,7 +489,8 @@ void flex_table_serialize(CHFA &chfa, ostream &os,
|
|||||||
|
|
||||||
void CHFA::flex_table(ostream &os, optflags const &opts) {
|
void CHFA::flex_table(ostream &os, optflags const &opts) {
|
||||||
|
|
||||||
if (opts.control & CONTROL_DFA_STATE32) {
|
if (opts.control & CONTROL_DFA_STATE32 &&
|
||||||
|
default_base.size() > (1 << 16) - 1) {
|
||||||
// TODO: implement support for flags in separate table
|
// TODO: implement support for flags in separate table
|
||||||
// if (opts.control & CONTROL_DFA_FLAGS_TABLE) {
|
// if (opts.control & CONTROL_DFA_FLAGS_TABLE) {
|
||||||
// if (opts.dump & DUMP_FLAGS_TABLE)
|
// if (opts.dump & DUMP_FLAGS_TABLE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user