public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "hjl dot tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug shlibs/11293] gdb is broken on Linux/i386
Date: Wed, 17 Feb 2010 20:02:00 -0000	[thread overview]
Message-ID: <20100217200222.23920.qmail@sourceware.org> (raw)
In-Reply-To: <20100217195339.11293.hjl.tools@gmail.com>


------- Additional Comments From hjl dot tools at gmail dot com  2010-02-17 20:02 -------
This code

---
            if (addr_bit < (sizeof (ULONGEST) * HOST_CHAR_BIT))
              {    
                CORE_ADDR space_size = (ULONGEST) 1 << addr_bit;
                CORE_ADDR tmp_entry_point = exec_entry_point (tmp_bfd,
                                                              tmp_bfd_target);

                gdb_assert (load_addr < space_size);

                /* TMP_ENTRY_POINT exceeding SPACE_SIZE would be for prelinked
                   64bit ld.so with 32bit executable, it should not happen.  */

                if (tmp_entry_point < space_size
                    && tmp_entry_point + load_addr >= space_size)
                  load_addr -= space_size;
              }    
---

doesn't make much senses. For 32bit, addr_bit is 32 and CORE_ADDR is
4 byte.

CORE_ADDR space_size = (ULONGEST) 1 << addr_bit;

will overflow.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11293

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2010-02-17 20:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 19:53 [Bug shlibs/11293] New: " hjl dot tools at gmail dot com
2010-02-17 19:56 ` [Bug shlibs/11293] " hjl dot tools at gmail dot com
2010-02-17 20:02 ` hjl dot tools at gmail dot com [this message]
2010-02-17 20:06 ` hjl dot tools at gmail dot com
2010-02-17 20:17 ` hjl dot tools at gmail dot com
2010-02-17 20:47 ` cvs-commit at gcc dot gnu dot org
2010-02-17 20:50 ` hjl dot tools 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=20100217200222.23920.qmail@sourceware.org \
    --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: link
Be 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).