public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mehmetgelisin at aol dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug string/17279] strncat(..., ..., SIZE_MAX) behaves incorrectly Date: Fri, 10 Sep 2021 19:36:49 +0000 [thread overview] Message-ID: <bug-17279-131-2Q3tJ0l9xs@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-17279-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=17279 Mehmet gelisin <mehmetgelisin at aol dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mehmetgelisin at aol dot com --- Comment #3 from Mehmet gelisin <mehmetgelisin at aol dot com> --- In collect_register() function of arc-linux-tdep.c, the "eret" (exception return) register value is not being reported correctly. Background: https://komiya-dental.com/ When asked for the "pc" value, we have to update the "eret" register with GDB's STOP_PC. The "eret" instructs the kernel code where to jump back when an instruction has stopped due to a breakpoint. This is how collect_register() is doing so: --------------8<-------------- if (regnum == gdbarch_pc_regnum (gdbarch)) regnum = ARC_ERET_REGNUM; regcache->raw_collect (regnum, buf + arc_linux_core_reg_offsets[regnum]); -------------->8-------------- Root cause: http://www.iu-bloomington.com/ Although this is using the correct offset (ERET register's), it is also changing the REGNUM itself. Therefore, raw_collect (regnum, ...) is not reading from "pc" anymore. Consequence: This bug affects the "native ARC gdb" badly and causes kernel code to jump to addresses after the breakpoint and not executing the "breakpoint"ed instructions at all. That "native ARC gdb" feature is not upstream yet and is in review at the time of writing [1]. https://www.webb-dev.co.uk/ In collect_register() function of arc-linux-tdep.c, the "eret" (exception return) register value is not being reported correctly. Background: https://waytowhatsnext.com/ When asked for the "pc" value, we have to update the "eret" register with GDB's STOP_PC. The "eret" instructs the kernel code where to jump back when an instruction has stopped due to a breakpoint. This is how collect_register() is doing so: --------------8<-------------- if (regnum == gdbarch_pc_regnum (gdbarch)) regnum = ARC_ERET_REGNUM; http://www.acpirateradio.co.uk/ regcache->raw_collect (regnum, buf + arc_linux_core_reg_offsets[regnum]); -------------->8-------------- Root cause: Although this is using the correct offset (ERET register's), it is also changing the REGNUM itself. Therefore, raw_collect (regnum, ...) is not reading from "pc" anymore. http://www.logoarts.co.uk/ Consequence: This bug affects the "native ARC gdb" badly and causes kernel code to jump to addresses after the breakpoint and not executing the "breakpoint"ed instructions at all. That "native ARC gdb" feature is not upstream yet and is in review at the time of writing [1]. In collect_register() function of arc-linux-tdep.c, the "eret" http://www.slipstone.co.uk/ (exception return) register value is not being reported correctly. Background: When asked for the "pc" value, http://embermanchester.uk/ we have to update the "eret" register with GDB's STOP_PC. The "eret" instructs the kernel code where to jump back when an instruction has stopped due to a breakpoint. This is how collect_register() is doing so: http://connstr.net/ --------------8<-------------- if (regnum == gdbarch_pc_regnum (gdbarch)) http://joerg.li/ regnum = ARC_ERET_REGNUM; regcache->raw_collect (regnum, buf + arc_linux_core_reg_offsets[regnum]); -------------->8-------------- http://www.jopspeech.com/ Root cause: Although this is using the correct offset (ERET register's), it is also changing the REGNUM itself. Therefore, raw_collect (regnum, ...) is not reading from "pc" anymore. http://www.wearelondonmade.com/ Consequence: This bug affects the "native ARC gdb" badly and causes kernel code to jump to addresses http://www.compilatori.com/ after the breakpoint and not executing the "breakpoint"ed instructions at all. That "native ARC gdb" feature is not upstream yet and is in review at the time of writing [1]. http://www-look-4.com/ -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-09-10 19:36 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-16 9:58 [Bug libc/17279] New: " roche at httrack dot com 2015-08-27 22:23 ` [Bug string/17279] " jsm28 at gcc dot gnu.org 2021-08-10 11:45 ` ucelsanicin at yahoo dot com 2021-09-10 19:36 ` mehmetgelisin at aol dot com [this message] 2021-09-10 19:53 ` mark at klomp dot org 2021-09-22 16:58 ` mervegunesli at aol dot com 2021-10-09 11:00 ` gulsenenginar at aol dot com 2021-11-08 8:08 ` richardsjenkins70 at gmail dot com
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-17279-131-2Q3tJ0l9xs@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@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).