From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E6413858009; Sat, 20 Mar 2021 19:56:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E6413858009 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99687] New: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x604000000d50 Date: Sat, 20 Mar 2021 19:56:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc blocked target_milestone Message-ID: 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: Sat, 20 Mar 2021 19:56:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99687 Bug ID: 99687 Summary: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x604000000d50 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: nathan at gcc dot gnu.org Blocks: 86656 Target Milestone: --- I noticed this issue: $ ./xg++ -B. /home/marxin/Programming/gcc2/gcc/testsuite/g++.dg/modules/keyword-1_a.C -c -std=3Dc++17 -fmodules-ts =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D26209=3D=3DERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs= operator delete) on 0x604000000d50 #0 0x7ffff7674f47 in operator delete(void*, unsigned long) (/usr/lib64/libasan.so.6+0xb3f47) #1 0xf4cfd6 in fini_modules() /home/marxin/Programming/gcc2/gcc/cp/module.cc:20012 #2 0xda5f20 in c_parse_final_cleanups() /home/marxin/Programming/gcc2/gcc/cp/decl2.c:5239 #3 0x1493a37 in c_common_parse_file() /home/marxin/Programming/gcc2/gcc/c-family/c-opts.c:1240 #4 0x27a4946 in compile_file /home/marxin/Programming/gcc2/gcc/toplev.c= :457 #5 0x27add07 in do_compile /home/marxin/Programming/gcc2/gcc/toplev.c:2= 201 #6 0x27ae56b in toplev::main(int, char**) /home/marxin/Programming/gcc2/gcc/toplev.c:2340 #7 0x5179dcb in main /home/marxin/Programming/gcc2/gcc/main.c:39 #8 0x7ffff7095b24 in __libc_start_main ../csu/libc-start.c:332 #9 0xab9c1d in _start (/home/marxin/Programming/gcc2/objdir/gcc/cc1plus+0xab9c1d) 0x604000000d50 is located 0 bytes inside of 40-byte region [0x604000000d50,0x604000000d78) allocated by thread T0 here: #0 0x7ffff767295f in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb1= 95f) #1 0x53c4a47 in xrealloc /home/marxin/Programming/gcc2/libiberty/xmalloc.c:177 #2 0xf64061 in void va_heap::reserve(vec*&, unsigned int, bool) /home/marxin/Programming/gcc2/gcc/vec.h:290 #3 0xf5ac8d in bool vec_safe_reserve(vec*&, unsigned int, bool) /home/marxin/Programming/gcc2/gcc/vec.h:698 #4 0xf4bbc0 in init_modules(cpp_reader*) /home/marxin/Programming/gcc2/gcc/cp/module.cc:19779 #5 0xce903a in cxx_init_decl_processing() /home/marxin/Programming/gcc2/gcc/cp/decl.c:4708 #6 0xe42537 in cxx_init() /home/marxin/Programming/gcc2/gcc/cp/lex.c:330 #7 0x27ac419 in lang_dependent_init /home/marxin/Programming/gcc2/gcc/toplev.c:1889 #8 0x27adc03 in do_compile /home/marxin/Programming/gcc2/gcc/toplev.c:2= 186 #9 0x27ae56b in toplev::main(int, char**) /home/marxin/Programming/gcc2/gcc/toplev.c:2340 #10 0x5179dcb in main /home/marxin/Programming/gcc2/gcc/main.c:39 #11 0x7ffff7095b24 in __libc_start_main ../csu/libc-start.c:332 SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/usr/lib64/libasan.so.6+0xb3f47) in operator delete(void*, unsigned long) =3D=3D26209=3D=3DHINT: if you don't care about these errors you may set ASAN_OPTIONS=3Dalloc_dealloc_mismatch=3D0 =3D=3D26209=3D=3DABORTING Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D86656 [Bug 86656] [meta-bug] Issues found with -fsanitize=3Daddress=