public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "mehmetgelisin at aol dot com" <sourceware-bugzilla@sourceware.org> 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 [thread overview] Message-ID: <bug-24454-4717-eBHZo8YmfK@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-24454-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=24454 Mehmet gelisin <mehmetgelisin at aol dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mehmetgelisin at aol dot com --- Comment #13 from Mehmet gelisin <mehmetgelisin at aol dot com> --- #include <locale.h> #include <stdio.h> #include <wchar.h> 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=en_US.UTF-8 ./poc Segmentation fault $ python -c 'print 13*"\t"' | LC_CTYPE=POSIX ./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=0xb77295a0 <_IO_2_1_stdin_>) at wfileops.c:534 #1 0xb75e2bc6 in _IO_default_setbuf (fp=0xb77295a0 <_IO_2_1_stdin_>, p=0x0, len=0) at genops.c:523 #2 0xb75df2e2 in _IO_new_file_setbuf (fp=0xb77295a0 <_IO_2_1_stdin_>, p=0x0, len=0) at fileops.c:459 https://www.webb-dev.co.uk/ #3 0xb75e3516 in _IO_unbuffer_all () at genops.c:921 #4 _IO_cleanup () at genops.c:966 #5 0xb75a5632 in __run_exit_handlers (status=0, listp=0xb77293dc <__exit_funcs>, run_list_atexit=true, run_dtors=true) at exit.c:96 #6 0xb75a56f1 in __GI_exit (status=0) at exit.c:105 #7 0xb758f1b2 in __libc_start_main (main=0x804846b <main>, argc=1, argv=0xbfef4004, init=0x80484b0 <__libc_csu_init>, fini=0x8048510 <__libc_csu_fini>, rtld_fini=0xb774d7a0 <_dl_fini>, stack_end=0xbfef3ffc) at ../csu/libc-start.c:323 https://waytowhatsnext.com/ #include <locale.h> #include <stdio.h> #include <wchar.h> 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=en_US.UTF-8 ./poc Segmentation fault $ python -c 'print 13*"\t"' | LC_CTYPE=POSIX ./poc $ _ http://www.logoarts.co.uk/ 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.uk/ The stack trace on my system with glibc 2.24 looks like this: http://connstr.net/ (gdb) bt #0 __GI__IO_wfile_sync (fp=0xb77295a0 <_IO_2_1_stdin_>) at wfileops.c:534 http://joerg.li/ #1 0xb75e2bc6 in _IO_default_setbuf (fp=0xb77295a0 <_IO_2_1_stdin_>, p=0x0, len=0) at genops.c:523 #2 0xb75df2e2 in _IO_new_file_setbuf (fp=0xb77295a0 <_IO_2_1_stdin_>, p=0x0, http://www.jopspeech.com/ len=0) 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=0, listp=0xb77293dc <__exit_funcs>, run_list_atexit=true, run_dtors=true) at exit.c:96 #6 0xb75a56f1 in __GI_exit (status=0) at exit.c:105 http://www.compilatori.com/ #7 0xb758f1b2 in __libc_start_main (main=0x804846b <main>, argc=1, argv=0xbfef4004, init=0x80484b0 <__libc_csu_init>, fini=0x8048510 <__libc_csu_fini>, http://www-look-4.com/ rtld_fini=0xb774d7a0 <_dl_fini>, stack_end=0xbfef3ffc) at ../csu/libc-start.c:323 -- You are receiving this mail because: You are on the CC list for the bug.
next parent reply other threads:[~2021-09-10 19:35 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-24454-4717@http.sourceware.org/bugzilla/> 2021-09-10 19:35 ` mehmetgelisin at aol dot com [this message] 2021-10-19 7:14 ` progonsaytu at gmail dot com 2021-10-19 7:31 ` mark at klomp dot org 2021-10-24 10:03 ` glassmtech at ukr dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-24454-4717-eBHZo8YmfK@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).