mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
We recently ran into a real world profile bug where the option `-O no-expr-simplify` causes a 10x increase in apparmor_parser runtime and memory usage [1] that breaks existing customers. The decision to use `-O no-expr-simplify` was taken in 2014 [2] and the profiles back then where simpler. This commit will make some profile generation slower but it will avoid going into the exponential memory usage when compiled with `apparmor_parser -O no-expr-simplify`. [1] https://bugs.launchpad.net/snapd/+bug/2025030 [2] https://bugs.launchpad.net/ubuntu-rtm/+source/apparmor/+bug/1383858