public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "andrew.burgess at embecosm dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/27847] A possible divide by zero bug in amd64_has_unaligned_fields (amd64-tdep.c) Date: Wed, 12 May 2021 12:52:10 +0000 [thread overview] Message-ID: <bug-27847-4717-LNhvx70A4c@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27847-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27847 Andrew Burgess <andrew.burgess at embecosm dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew.burgess at embecosm dot com --- Comment #3 from Andrew Burgess <andrew.burgess at embecosm dot com> --- Created attachment 13442 --> https://sourceware.org/bugzilla/attachment.cgi?id=13442&action=edit possible test and fix The attachment contains a possible test for this issue as well as a possible fix. Unlike the previously proposed fix I suggest that if 0 ever comes up then we throw an error. The 0 indicates that GDB is unable to figure out the alignment for a field, as such I don't think we can correctly answer the question as to whether the struct has any unaligned fields, and answer we give would be a guess, and thus might lead to incorrect results. Let me know your thoughts. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-05-12 12:52 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-11 8:59 [Bug gdb/27847] New: " yguoaz at cse dot ust.hk 2021-05-11 9:00 ` [Bug gdb/27847] " yguoaz at cse dot ust.hk 2021-05-11 9:02 ` yguoaz at cse dot ust.hk 2021-05-11 19:08 ` tromey at sourceware dot org 2021-05-12 1:43 ` yguoaz at cse dot ust.hk 2021-05-12 12:52 ` andrew.burgess at embecosm dot com [this message] 2021-05-17 13:08 ` tromey at sourceware dot org 2021-06-04 15:45 ` andrew.burgess at embecosm dot com 2021-06-07 15:56 ` cvs-commit at gcc dot gnu.org 2021-06-07 15:57 ` andrew.burgess at embecosm 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-27847-4717-LNhvx70A4c@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).