public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1
@ 2011-06-09 14:15 lkn0371 at 163 dot com
  2011-06-09 14:20 ` [Bug gdb/12866] " lkn0371 at 163 dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-09 14:15 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: fail to load elf compiled by ARM RVCT3.1
           Product: gdb
           Version: 7.1
            Status: NEW
          Severity: critical
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: lkn0371@163.com


Created attachment 5778
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5778
elf file I used

When I use GDB to debug arm program, it failed to load elf file compiled by ARM
RVCT. It can load elf compiled by ADS1.2. But RVCT3.1 and ADS1.2 are using the
same dwarf version (dwarf 2)

the error message as below:
../../gdb-7.1.50.20100521/gdb/utils.c:1269: internal-error: virtual memory
exhausted: can't allocate 21390954 bytes.

Attached please find the elf file.

thank you very much to help me!

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
@ 2011-06-09 14:20 ` lkn0371 at 163 dot com
  2011-06-10 12:25 ` qiyao at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-09 14:20 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from 1avender <lkn0371 at 163 dot com> 2011-06-09 14:19:23 UTC ---
Created attachment 5779
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5779
error screen

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
  2011-06-09 14:20 ` [Bug gdb/12866] " lkn0371 at 163 dot com
@ 2011-06-10 12:25 ` qiyao at gcc dot gnu.org
  2011-06-13  2:39 ` lkn0371 at 163 dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: qiyao at gcc dot gnu.org @ 2011-06-10 12:25 UTC (permalink / raw)
  To: gdb-prs

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

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |qiyao at gcc dot gnu.org

--- Comment #2 from Yao Qi <qiyao at gcc dot gnu.org> 2011-06-10 12:24:46 UTC ---

> 
> the error message as below:
> ../../gdb-7.1.50.20100521/gdb/utils.c:1269: internal-error: virtual memory
> exhausted: can't allocate 21390954 bytes.

Your GDB is quite old.  Can gdb cvs trunk or 7.2 have the same problem?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
  2011-06-09 14:20 ` [Bug gdb/12866] " lkn0371 at 163 dot com
  2011-06-10 12:25 ` qiyao at gcc dot gnu.org
@ 2011-06-13  2:39 ` lkn0371 at 163 dot com
  2011-06-13  2:41 ` lkn0371 at 163 dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-13  2:39 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from 1avender <lkn0371 at 163 dot com> 2011-06-13 02:38:45 UTC ---
(In reply to comment #2)
> > 
> > the error message as below:
> > ../../gdb-7.1.50.20100521/gdb/utils.c:1269: internal-error: virtual memory
> > exhausted: can't allocate 21390954 bytes.
> Your GDB is quite old.  Can gdb cvs trunk or 7.2 have the same problem?

thank you very much!
I tried gdb 7.2 again.
the same problem, only different line number.

../../gdb-7.2/gdb/utils.c:1401: internal-error: virtual memory
exhausted: can't allocate 213909504 bytes.

I thought there may be some memory leak when gdb loading elf compiled by
rvct3.1
I searched this kind of usage, gdb + rvct3.1, but there is no result. So I
think there maybe nobody used it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (2 preceding siblings ...)
  2011-06-13  2:39 ` lkn0371 at 163 dot com
@ 2011-06-13  2:41 ` lkn0371 at 163 dot com
  2011-06-13  4:58 ` lkn0371 at 163 dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-13  2:41 UTC (permalink / raw)
  To: gdb-prs

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

1avender <lkn0371 at 163 dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lkn0371 at 163 dot com
            Version|7.1                         |7.2

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (3 preceding siblings ...)
  2011-06-13  2:41 ` lkn0371 at 163 dot com
@ 2011-06-13  4:58 ` lkn0371 at 163 dot com
  2011-06-15 14:30 ` lkn0371 at 163 dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-13  4:58 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from 1avender <lkn0371 at 163 dot com> 2011-06-13 04:57:40 UTC ---
Additional information:

Environment:
C, C++, RVCT 3.1 (1021), dwarf2, Host=i686-pc-mingw32, target=i686-pc-mingw32

When I changed to use RVCT 3.1 (569) to link the elf, it can be loaded
successful.

Then, I changed to another big project and used RVCT 3.1 (569) to link, it
fails to be loaded this time.

So file size is one of the affect factor.

I'm trying to change the target (target=i686-pc-mingw32 -> target=arm-elf)...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (4 preceding siblings ...)
  2011-06-13  4:58 ` lkn0371 at 163 dot com
@ 2011-06-15 14:30 ` lkn0371 at 163 dot com
  2011-06-16  5:45 ` [Bug gdb/12866] gdb " lkn0371 at 163 dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-15 14:30 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from 1avender <lkn0371 at 163 dot com> 2011-06-15 14:29:40 UTC ---
Status update:
We found that it is always ok when using elf compiled by RVCT3.1(Build 1021),
even big file size

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] gdb fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (5 preceding siblings ...)
  2011-06-15 14:30 ` lkn0371 at 163 dot com
@ 2011-06-16  5:45 ` lkn0371 at 163 dot com
  2013-10-30 19:38 ` will.newton at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: lkn0371 at 163 dot com @ 2011-06-16  5:45 UTC (permalink / raw)
  To: gdb-prs

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

1avender <lkn0371 at 163 dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|fail to load elf compiled   |gdb fail to load elf
                   |by ARM RVCT3.1              |compiled by ARM RVCT3.1

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] gdb fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (6 preceding siblings ...)
  2011-06-16  5:45 ` [Bug gdb/12866] gdb " lkn0371 at 163 dot com
@ 2013-10-30 19:38 ` will.newton at gmail dot com
  2013-10-31 20:55 ` tromey at redhat dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: will.newton at gmail dot com @ 2013-10-30 19:38 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=12866

Will Newton <will.newton at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |will.newton at gmail dot com
         Resolution|---                         |INVALID

--- Comment #6 from Will Newton <will.newton at gmail dot com> ---

The DWARF in this file is corrupt and causes a loop in the structure of the
debug information, causing gdb to allocate increasing amounts of memory. It's
not clear that it can be avoided with this type of corruption.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] gdb fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (7 preceding siblings ...)
  2013-10-30 19:38 ` will.newton at gmail dot com
@ 2013-10-31 20:55 ` tromey at redhat dot com
  2013-11-06 15:15 ` cvs-commit at gcc dot gnu.org
  2013-11-06 15:17 ` will.newton at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2013-10-31 20:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=12866

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |tromey at redhat dot com
         Resolution|INVALID                     |---

--- Comment #7 from Tom Tromey <tromey at redhat dot com> ---
(In reply to Will Newton from comment #6)
> The DWARF in this file is corrupt and causes a loop in the structure of the
> debug information, causing gdb to allocate increasing amounts of memory.
> It's not clear that it can be avoided with this type of corruption.

Could you post your analysis and say what exactly is wrong
with the DWARF?
I think it is valuable to try to harden gdb against this kind
of error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] gdb fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (8 preceding siblings ...)
  2013-10-31 20:55 ` tromey at redhat dot com
@ 2013-11-06 15:15 ` cvs-commit at gcc dot gnu.org
  2013-11-06 15:17 ` will.newton at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-11-06 15:15 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
       via  b9502d3fd7848cd4d843be8bdc28633a3d24438d (commit)
      from  452a569eff947a21369d43cc7632c320e5b8a085 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b9502d3fd7848cd4d843be8bdc28633a3d24438d

commit b9502d3fd7848cd4d843be8bdc28633a3d24438d
Author: Will Newton <will.newton@linaro.org>
Date:   Fri Nov 1 14:14:50 2013 -0700

    gdb/dwarf2read.c: Sanity check DW_AT_sibling values.

    When reading objects with corrupt debug information it is possible that
    the sibling chain can form a loop, which leads to an infinite loop and
    memory exhaustion.

    Avoid this situation by disregarding and DW_AT_sibling values that point
    to a lower address than the current entry.

    gdb/ChangeLog:

    2013-11-06  Will Newton  <will.newton@linaro.org>

        PR gdb/12866
        * dwarf2read.c (skip_one_die): Sanity check DW_AT_sibling
        values.  (read_partial_die): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog    |    6 ++++++
 gdb/dwarf2read.c |   22 ++++++++++++++++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/12866] gdb fail to load elf compiled by ARM RVCT3.1
  2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
                   ` (9 preceding siblings ...)
  2013-11-06 15:15 ` cvs-commit at gcc dot gnu.org
@ 2013-11-06 15:17 ` will.newton at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: will.newton at gmail dot com @ 2013-11-06 15:17 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=12866

Will Newton <will.newton at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Will Newton <will.newton at gmail dot com> ---

The commit b9502d3fd7848cd4d843be8bdc28633a3d24438d fixes this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-11-06 15:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 14:15 [Bug gdb/12866] New: fail to load elf compiled by ARM RVCT3.1 lkn0371 at 163 dot com
2011-06-09 14:20 ` [Bug gdb/12866] " lkn0371 at 163 dot com
2011-06-10 12:25 ` qiyao at gcc dot gnu.org
2011-06-13  2:39 ` lkn0371 at 163 dot com
2011-06-13  2:41 ` lkn0371 at 163 dot com
2011-06-13  4:58 ` lkn0371 at 163 dot com
2011-06-15 14:30 ` lkn0371 at 163 dot com
2011-06-16  5:45 ` [Bug gdb/12866] gdb " lkn0371 at 163 dot com
2013-10-30 19:38 ` will.newton at gmail dot com
2013-10-31 20:55 ` tromey at redhat dot com
2013-11-06 15:15 ` cvs-commit at gcc dot gnu.org
2013-11-06 15:17 ` will.newton at gmail dot com

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).