https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91878
Bug ID: 91878 Summary: No sanitizer report for past-end access of std∷set Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: Hi-Angel at yandex dot ru CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- # Steps to reproduce (in terms of terminal commands) $ cat test2.cpp #include <set> #include <cstdio> int main() { std::set<int> s{}; printf("%i\n", *s.begin()); } $ g++ test2.cpp -o a -g3 -O0 -fsanitize=address,undefined $ ./a ## Expected It either crashes on past-end access, or produces a warning (depending on whether it's handled as a past-end access or UB). ## Actual It prints: 0