https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124949
--- Comment #17 from Lukas Wunner <lukas at wunner dot de> --- (In reply to Drea Pinski from comment #15) > So inlining has an estimate of what the stack will be for each function. > Note I said estimate because it is not 100% accurate. And then tries to > limit based on that estimate. It is just with -fsanitize=kernel-address, the > stack goes up and might not be taken that into account for the estimate that > the inlining uses. >From a quick look at gcc/ipa-inline.cc, it seems sanitization is only considered with regards to compatibility of sanitization flags (see sanitize_attrs_match_for_inline_p()). But the cost estimation (badness) of inlining does not seem to take into account the extra cost incurred by sanitization. Maybe it should? (Or maybe I'm just missing something.)
