https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81040
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Resolution|WONTFIX |--- Severity|normal |enhancement --- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Andrey Ryabinin from comment #4) > (In reply to Martin Liška from comment #3) > > As mentioned by Richard, currently ASAN is able to protect function > > variables that live on stack. In your case the function foo is called with > > constant that is then assigned a stack slot which we don't instrument with > > red zones. > > Exactly, that's the problem. That stack slot should be instrumented with > redzones. Surely compiler is capable of doing this. Clang does this. > So I don't understand why you closed this as WONTFIX. Sorry, I was not aware that it's actually functionality supported by Clang. Thus it's enhancement on GCC's side.