From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4AA373857C65; Thu, 26 Aug 2021 12:23:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AA373857C65 From: "florin.iucha at amd dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/102077] New: null-pointer dereference in std::thread::detach() Date: Thu, 26 Aug 2021 12:22:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: florin.iucha at amd dot com 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 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: Thu, 26 Aug 2021 12:23:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102077 Bug ID: 102077 Summary: null-pointer dereference in std::thread::detach() Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: florin.iucha at amd dot com Target Milestone: --- Building static GDB using crosstool-ng (https://github.com/cpackham/crosstool-ng/tree/glibc-2.34) using: glibc 2.3= 4, binutils 2.37, GCC from 11 branch (2e90914b79dd1c591c8a4d663ae2319fbb15df2c= ), gdb 10.2 (statically linked) I get crash on startup: fldiag114 ~/x-tools/x86_64-tng-linux-gnu$ gdb ./x86_64-tng-linux-gnu/debug-root/usr/bin/gdb GNU gdb (Ubuntu 10.2-0ubuntu1~18.04~2) 10.2 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Traceback (most recent call last): File "", line 3, in ModuleNotFoundError: No module named 'libstdcxx' /home/fiucha/.gdbinit:7: Error in sourced command file: Error while executing Python code. Reading symbols from ./x86_64-tng-linux-gnu/debug-root/usr/bin/gdb... (gdb) run Starting program: /home/fiucha/x-tools/x86_64-tng-linux-gnu/x86_64-tng-linux-gnu/debug-root/u= sr/bin/gdb [Detaching after vfork from child process 35124] [New LWP 35125] Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x0000000000ac96c9 in std::thread::detach() () #2 0x0000000000a4424b in gdb::thread_pool::set_thread_count(unsigned long)= () #3 0x000000000070be47 in update_thread_pool_size() () #4 0x000000000070cb5e in _initialize_maint_cmds() () #5 0x00000000008fad52 in initialize_all_files() () #6 0x0000000000899f0b in gdb_init(char*) () #7 0x0000000000703cb4 in captured_main_1(captured_main_args*) () #8 0x0000000000704913 in captured_main(void*) () #9 0x000000000070497e in gdb_main(captured_main_args*) () #10 0x00000000004022de in main () (gdb) This is running on x86-64, built for x86-64. Os is Ubuntu 18.04 .=