From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44E803861030; Tue, 30 Mar 2021 08:39:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44E803861030 From: "stefansf at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/99814] regexec fails with -fsanitize=address Date: Tue, 30 Mar 2021 08:39:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stefansf at linux dot ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2021 08:39:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99814 --- Comment #2 from Stefan Schulze Frielinghaus --- Breakpoint 4, __interception::InterceptFunction (name=3D0x3fffd61e8f2 "rege= xec", ver=3D0x3fffd61eb7e "GLIBC_2.3.4", ptr_to_real=3D0x3fffd677d08 <__interception::real_regexec>, func=3D16779728,=20 wrapper=3D4398001883504) at /devel/gcc-4/src/libsanitizer/interception/interception_linux.cpp:74 74 void *addr =3D GetFuncAddr(name, ver); At the end of InterceptFunction we have: (gdb) print addr $1 =3D (void *) 0x3fffd2e9110 <__GI___regexec> The address itself also LGTM, i.e., `readelf -s /lib64/libc.so.6 | grep regexec` results in: 279: 00000000000e9110 344 FUNC GLOBAL DEFAULT 13 regexec@@GLIBC_2= .3.4 ... 25156: 00000000000e9110 344 FUNC LOCAL DEFAULT 13 __GI___regexec However, variables func and wrapper differ=20 (gdb) print func $2 =3D 16779728 (gdb) print wrapper $3 =3D 4398001883504 so we return false.=