> Right, and that of course could be a performance penalty as well. > >> >> > Then, cases like this: >> > >> > int glob; >> > int get_glob() { >> > return glob; >> > } >> > >> > can be handled trivially as it's known that sanitizing address of a >> > variable >> > referenced by name is a no-op--even for automatic locals, not just >> > globals. >> >> Automatic local variables may be accessed out of their bounds or after >> the execution has left their scope. > > > Yes, but not when they are accessed through their names, that is, without > taking their addresses--implicitly or explicitly.
I believe we don't instrument accesses to non-address-taken automatic local variables at -O1 and higher. At least, in most cases. As for globals, we have to instrument some of the scalar global accesses to catch https://code.google.com/p/address-sanitizer/wiki/InitializationOrderFiasco --kcc -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to address-sanitizer+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.