This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug shlibs/11488] New: fsf gdb x86_64-apple-darwin crashes when loading libraries due to an endless loop


fsf cvs gdb says: unable to read unknown load command 0x1a
and crashes afterwards.

This happens for code as simple as

-----------------------------------
//#include <QtCore/QCoreApplication>

int main(int argc, char *argv[])
{
//    QCoreApplication a(argc, argv);
//    QString name(argv[0]);

    return 0;
}
-----------------------------------

[I.e. basically a 'return 0;']

for a binary build with 

g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
-Wall -W -DQT_CORE_LIB -DQT_SHARED -I../../../git/qt/qt-4.6/mkspecs/macx-g++
-I../../qt-test-app
-I../../../git/qt/qt-4.6/lib/QtCore.framework/Versions/4/Headers
-I../../../git/qt/qt-4.6/include/QtCore -I../../../git/qt/qt-4.6/include -I.
-I../../qt-test-app -I. -F/data/git/qt/qt-4.6/lib -o main.o
../../qt-test-app/main.cpp

g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64
-mmacosx-version-min=10.5 -o qt-test-app main.o -F/data/git/qt/qt-4.6/lib
-L/data/git/qt/qt-4.6/lib -framework QtCore -L/data/git/qt/qt-4.6/lib

That's a plain Qt based application using a default 4.6 install of Qt.

[The qmake file generating that line is:

-----------------------------------
QT       += core
QT       -= gui

TARGET = qt-test-app
CONFIG   += console
CONFIG   -= app_bundle

SOURCES += main.cpp
-----------------------------------


The back trace:


Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5f3fffd0
0x0000000100145fd4 in decode_frame_entry (unit=0x1033a0580, start=0x102c77570
"\f", eh_frame_p=1, cie_table=0x7fff5fbfed50, fde_table=0x7fff5fbfed40) at
dwarf2-frame.c:1904
1904    {
(gdb) bt
#0  0x0000000100145fd4 in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1904
#1  0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#2  0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#3  0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#4  0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#5  0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#6  0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857

[snip]

#52396 0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#52397 0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#52398 0x000000010014668a in decode_frame_entry (unit=0x1033a0580,
start=0x102c77570 "\f", eh_frame_p=1, cie_table=0x7fff5fbfed50,
fde_table=0x7fff5fbfed40) at dwarf2-frame.c:1857
#52399 0x0000000100146ad3 in dwarf2_build_frame_info (objfile=0x10334ee00) at
dwarf2-frame.c:2067
#52400 0x000000010001b66f in macho_symfile_read (objfile=0x10334ee00,
symfile_flags=8) at machoread.c:664
#52401 0x00000001000ca7c9 in syms_from_objfile (objfile=0x10334ee00,
addrs=0x1007cfb90, offsets=0x0, num_offsets=0, add_flags=8) at symfile.c:990
#52402 0x00000001000caa75 in symbol_file_add_with_addrs_or_offsets (abfd=<value
temporarily unavailable, due to optimizations>, add_flags=8, addrs=0x1007cfb90,
offsets=0x0, num_offsets=0, flags=2) at symfile.c:1082
#52403 0x0000000100016b88 in solib_read_symbols (so=0x100944800, flags=8) at
solib.c:484
#52404 0x00000001000173e7 in solib_add (pattern=0x0, from_tty=0, target=<value
temporarily unavailable, due to optimizations>, readsyms=1) at solib.c:776
#52405 0x00000001000dd850 in handle_inferior_event (ecs=0x7fff5fbff360) at
infrun.c:4099
#52406 0x00000001000e04b2 in wait_for_inferior (treat_exec_as_sigtrap=0) at
infrun.c:2483
#52407 0x00000001000e0848 in proceed (addr=0, siggnal=TARGET_SIGNAL_0, step=0)
at infrun.c:2005
#52408 0x00000001000d6dad in run_command_1 (args=0x0, from_tty=1,
tbreak_at_main=<value temporarily unavailable, due to optimizations>) at
infcmd.c:585
#52409 0x000000010018c98b in execute_command (p=0x100708af3 "", from_tty=1) at
top.c:441
#52410 0x00000001000f2a94 in command_handler (command=0x100708af0 "") at
event-top.c:511
#52411 0x00000001000f3655 in command_line_handler (rl=<value temporarily
unavailable, due to optimizations>) at event-top.c:736
#52412 0x00000001001c46b9 in rl_callback_read_char () at callback.c:205
#52413 0x00000001000f2bf9 in rl_callback_read_char_wrapper (client_data=<value
temporarily unavailable, due to optimizations>) at event-top.c:178
#52414 0x00000001000f17af in process_event () at event-loop.c:393
#52415 0x00000001000f2306 in gdb_do_one_event (data=<value temporarily
unavailable, due to optimizations>) at event-loop.c:458
#52416 0x00000001000eb349 in catch_errors (func=0x1000f20f0 <gdb_do_one_event>,
func_args=0x0, errstring=0x1002645d8 "", mask=<value temporarily unavailable,
due to optimizations>) at exceptions.c:510
#52417 0x0000000100058a36 in tui_command_loop (data=<value temporarily
unavailable, due to optimizations>) at ./tui/tui-interp.c:171
#52418 0x00000001000ed809 in captured_command_loop (data=<value temporarily
unavailable, due to optimizations>) at ./main.c:229
#52419 0x00000001000eb349 in catch_errors (func=0x1000ed800
<captured_command_loop>, func_args=0x0, errstring=0x1002645d8 "", mask=<value
temporarily unavailable, due to optimizations>) at exceptions.c:510
#52420 0x00000001000eceea in captured_main (data=<value temporarily unavailable,
due to optimizations>) at ./main.c:907
#52421 0x00000001000eb349 in catch_errors (func=0x1000ec560 <captured_main>,
func_args=0x7fff5fbff9c0, errstring=0x1002645d8 "", mask=<value temporarily
unavailable, due to optimizations>) at exceptions.c:510
#52422 0x00000001000ec32b in gdb_main (args=<value temporarily unavailable, due
to optimizations>) at ./main.c:916
#52423 0x00000001000015cd in main (argc=<value temporarily unavailable, due to
optimizations>, argv=<value temporarily unavailable, due to optimizations>) at
gdb.c:33

-- 
           Summary: fsf gdb x86_64-apple-darwin  crashes when loading
                    libraries due to an endless loop
           Product: gdb
           Version: 7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: shlibs
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: andre dot poenitz at nokia dot com
                CC: gdb-prs at sourceware dot org
  GCC host triplet: x86_64-apple-darwin


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]