sim/1923: Segmentation fault on x86-64 on simulated program load with arm-none-eabi-run

julian@codesourcery.com julian@codesourcery.com
Tue Apr 19 17:48:00 GMT 2005


>Number:         1923
>Category:       sim
>Synopsis:       Segmentation fault on x86-64 on simulated program load with arm-none-eabi-run
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 19 17:48:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     Julian Brown
>Release:        GNU gdb 6.3.50.20050419-cvs
>Organization:
>Environment:
Linux opteron 2.4.21-215-smp #1 SMP Tue Apr 27 16:05:19 UTC 2004 x86_64 unknown
>Description:
The simulator arm-none-eabi-run crashes with a segfault on x86-64 machines. This affects current CVS, and goes back at least as far as GNU gdb 6.3.50_2004-12-22-cvs. The native compiler is gcc (GCC) 3.2.2 (SuSE Linux), but the same happens with a native gcc 4.1 from cvs head.

This is the backtrace from inside gdb, loading a canonical "hello world" compiled from C:

(gdb) bt
#0  0x0000002a957f508b in chunk_alloc () from /lib64/libc.so.6
#1  0x0000002a957f4bc1 in malloc () from /lib64/libc.so.6
#2  0x0000000040005642 in sim_load_file (sd=0x1,
    myname=0x401e3c40 "/home/julian/prefix-x64-arm-p/bin/arm-none-eabi-run",
    callback=0x401c0020, prog=0x7fbffff7df "hello2", prog_bfd=0x401e2af0, verbose_p=0,
    lma_p=0, do_write=0x40004428 <sim_write>)
    at /home/julian/gdb/src/sim/arm/../common/sim-load.c:121
#3  0x0000000040005394 in sim_load (sd=0x1, prog=0x7fbffff7df "hello2", abfd=0x401e2af0,
    from_tty=0) at /home/julian/gdb/src/sim/arm/wrapper.c:894
#4  0x0000000040002245 in main (ac=1, av=0x7fbffff500)
    at /home/julian/gdb/src/sim/arm/../common/run.c:230
#5  0x0000002a957a7087 in __libc_start_main () from /lib64/libc.so.6
#6  0x0000000040001d2a in _start ()

The same binary runs fine with arm-none-eabi-run on i686.
>How-To-Repeat:
Compile binutils, gcc, gdb with "--target=arm-none-eabi". Compile a "hello world" program, and try running it.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list