https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99814
Bug ID: 99814
Summary: regexec fails with -fsanitize=address
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: stefansf at linux dot ibm.com
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: ---
Target: s390x
Testing against today's commit
https://gcc.gnu.org/g:d579e2e76f9469e1b386d693af57c5c4f0ede410
on s390x we have:
$ gcc pr98920.c -fsanitize=address && ./a.out
failed to match
The testcase succeeds without `-fsanitize=address`.
In GDB I see that the address loaded from _ZN14__interception12real_regexecE
equals the address of regexec@GLIBC_2.2 which explains why the testcase fails.
Without `-fsanitize=address` function regexec@@GLIBC_2.3.4 is executed.