From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 95FD0385AC35; Fri, 10 Sep 2021 19:35:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95FD0385AC35 From: "mehmetgelisin at aol dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/24454] nat/x86-linux-dregs.c:146: internal-error: void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped (lwp)' failed. Date: Fri, 10 Sep 2021 19:35:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mehmetgelisin at aol dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 8.3.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2021 19:35:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24454 Mehmet gelisin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mehmetgelisin at aol dot c= om --- Comment #13 from Mehmet gelisin --- #include #include #include int main(void) { setlocale(LC_ALL, ""); fgetwc(stdin); return 0; } https://komiya-dental.com/ --- $ gcc -o poc poc.c $ python -c 'print 13*"\t"' | LC_CTYPE=3Den_US.UTF-8 ./poc Segmentation fault $ python -c 'print 13*"\t"' | LC_CTYPE=3DPOSIX ./poc $ _ It means that I have to enter around 13 tabulator characters to trigger the issue, but it won't hurt to add a few more. I was able to reproduce this on other distributions with glibc 2.24, so I don't think that it's specific to= one of them. Also, this issue only happens with an LC_CTYPE of an UTF-8 locale. I have tested en_US and de_DE, which both trigger this issue. With POSIX or C, the segmentation fault is not triggered. I hope this helps you to track down this bug, as I was unable to figure out= the flush mechanisms in glibc in a reasonable time. :) The stack trace on my system with glibc 2.24 looks like this: http://www.iu-bloomington.com/ (gdb) bt #0 __GI__IO_wfile_sync (fp=3D0xb77295a0 <_IO_2_1_stdin_>) at wfileops.c:534 #1 0xb75e2bc6 in _IO_default_setbuf (fp=3D0xb77295a0 <_IO_2_1_stdin_>, p= =3D0x0, len=3D0) at genops.c:523 #2 0xb75df2e2 in _IO_new_file_setbuf (fp=3D0xb77295a0 <_IO_2_1_stdin_>, p= =3D0x0, len=3D0) at fileops.c:459 https://www.webb-dev.co.uk/=20 #3 0xb75e3516 in _IO_unbuffer_all () at genops.c:921 #4 _IO_cleanup () at genops.c:966 #5 0xb75a5632 in __run_exit_handlers (status=3D0, listp=3D0xb77293dc <__exit_funcs>, run_list_atexit=3Dtrue, run_dtors=3Dtrue) at exit.c:96 #6 0xb75a56f1 in __GI_exit (status=3D0) at exit.c:105 #7 0xb758f1b2 in __libc_start_main (main=3D0x804846b
, argc=3D1, argv=3D0xbfef4004, init=3D0x80484b0 <__libc_csu_init>, fini=3D0x8048510 <__libc_csu_fini>,=20 rtld_fini=3D0xb774d7a0 <_dl_fini>, stack_end=3D0xbfef3ffc) at ../csu/libc-start.c:323 https://waytowhatsnext.com/=20=20 #include #include #include int main(void) http://www.acpirateradio.co.uk/ { setlocale(LC_ALL, ""); fgetwc(stdin); return 0; } --- $ gcc -o poc poc.c $ python -c 'print 13*"\t"' | LC_CTYPE=3Den_US.UTF-8 ./poc Segmentation fault $ python -c 'print 13*"\t"' | LC_CTYPE=3DPOSIX ./poc $ _ http://www.logoarts.co.uk/=20 It means that I have to enter around 13 tabulator characters to trigger the issue, but it won't hurt to add a few more. I was able to reproduce this on other distributions with glibc 2.24, so I don't think that it's specific to= one of them. Also, this issue only happens with an LC_CTYPE of an UTF-8 locale. I have tested en_US and de_DE, which both trigger this issue. With POSIX or C, the http://www.slipstone.co.uk/ segmentation fault is not triggered. I hope this helps you to track down this bug, as I was unable to figure out= the flush mechanisms in glibc in a reasonable time. :) http://embermanchester.u= k/=20 The stack trace on my system with glibc 2.24 looks like this: http://connstr.net/=20 (gdb) bt #0 __GI__IO_wfile_sync (fp=3D0xb77295a0 <_IO_2_1_stdin_>) at wfileops.c:534 http://joerg.li/=20 #1 0xb75e2bc6 in _IO_default_setbuf (fp=3D0xb77295a0 <_IO_2_1_stdin_>, p= =3D0x0, len=3D0) at genops.c:523 #2 0xb75df2e2 in _IO_new_file_setbuf (fp=3D0xb77295a0 <_IO_2_1_stdin_>, p= =3D0x0,=20 http://www.jopspeech.com/ len=3D0) at fileops.c:459 #3 0xb75e3516 in _IO_unbuffer_all () at genops.c:921 #4 _IO_cleanup () at genops.c:966 http://www.wearelondonmade.com/ #5 0xb75a5632 in __run_exit_handlers (status=3D0, listp=3D0xb77293dc <__exit_funcs>, run_list_atexit=3Dtrue, run_dtors=3Dtrue) at exit.c:96 #6 0xb75a56f1 in __GI_exit (status=3D0) at exit.c:105 http://www.compilatori.com/ #7 0xb758f1b2 in __libc_start_main (main=3D0x804846b
, argc=3D1, argv=3D0xbfef4004, init=3D0x80484b0 <__libc_csu_init>, fini=3D0x8048510 <__libc_csu_fini>, http://www-look-4.com/ rtld_fini=3D0xb774d7a0 <_dl_fini>, stack_end=3D0xbfef3ffc) at ../csu/libc-start.c:323 --=20 You are receiving this mail because: You are on the CC list for the bug.=