Description of problem: ../../gdb/gdbtypes.c:3135: internal-error: copy_type_recursive_1: Assertion `TYPE_OBJFILE (type) == objfile' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Version-Release number of selected component (if applicable): gdb-6.8.50.20090302-27.fc11.x86_64 How reproducible: very Steps to Reproduce: (gdb) list 77 C 78 NZERO = 0 79 SMOD = 1. / SSFT**2 80 NEXO = 0 81 TLEFT = TEND - TIME 82 NERR = 0 83 IF( NSTEPS .EQ. 0 ) THEN 84 C 85 C Calculate acceleration corrections to enforce kinematic constraints 86 C on initial velocities - (gdb) step 79 SMOD = 1. / SSFT**2 (gdb) print ssft $1 = 1 (gdb) whatis ssft type = real(kind=8) (gdb) step 22 SUBROUTINE SOLVE( NSTEPS,KOUT,KPLOT,NODWR,NELWR,NSVLST,NVARHI, (gdb) step 79 SMOD = 1. / SSFT**2 (gdb) step 22 SUBROUTINE SOLVE( NSTEPS,KOUT,KPLOT,NODWR,NELWR,NSVLST,NVARHI, (gdb) Wondering if this is really a gdb problem or a gfortan/gcc issue.
Looks like a problem with my makefiles and how compiler options are passed.
GDB must not crash with internal error on any input. Moreover I am very interested in this part as the assertion is in a Fedora-only Fortran allocated arrays support. Is it possible to provide a reproducer? Thanks.
Background: I believe I'm having problems with the C memory management routines for some old F77 code, and based on what's happening when stepping through the debugger above, I'm guessing that the memory management routines have overwritten some of the code execution text. I doubt that it makes much sense to pursue this error further, but if you're still interested in a reproducer I'll see what I can do. It may take a while.
This error comes from the reading of the DWARF info, one should not be able to corrupt this information by the debuggee runtime code, no matter how well one tries to. Yes, I am still interested in a reproducer, if it is feasible.
I'm seeing the same error. Steps to reproduce: - F11 32-bit system, current with updates-testing - Build hdf from the current srpm, the build will fail during the tests - cd HDF4.2r4/hdf/test - gdb ./fortestF (gdb) run Starting program: /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF =========================================== HDF Library Fortran Interface Tests Started =========================================== Built with HDF Library Version: 4.2r4 HDF Version 4.2 Release 4, January 25, 2009 Testing -- slab Testing -- r24 Testing -- an *** stack smashing detected ***: /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF terminated ======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x48)[0x7b5bd8] /lib/libc.so.6(__fortify_fail+0x0)[0x7b5b90] /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF[0x8059495] /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF[0x8059c87] /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF[0x804ba94] /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF[0x804c560] /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF[0x80d10fb] /lib/libc.so.6(__libc_start_main+0xe6)[0x6d4a66] /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF[0x804a1b1] ======= Memory map: ======== 0069a000-006ba000 r-xp 00000000 08:02 1509 /lib/ld-2.10.1.so 006ba000-006bb000 r--p 0001f000 08:02 1509 /lib/ld-2.10.1.so 006bb000-006bc000 rw-p 00020000 08:02 1509 /lib/ld-2.10.1.so 006be000-00829000 r-xp 00000000 08:02 10431 /lib/libc-2.10.1.so 00829000-0082a000 ---p 0016b000 08:02 10431 /lib/libc-2.10.1.so 0082a000-0082c000 r--p 0016b000 08:02 10431 /lib/libc-2.10.1.so 0082c000-0082d000 rw-p 0016d000 08:02 10431 /lib/libc-2.10.1.so 0082d000-00830000 rw-p 0082d000 00:00 0 00832000-00858000 r-xp 00000000 08:02 10735 /lib/libm-2.10.1.so 00858000-00859000 r--p 00025000 08:02 10735 /lib/libm-2.10.1.so 00859000-0085a000 rw-p 00026000 08:02 10735 /lib/libm-2.10.1.so 00880000-00892000 r-xp 00000000 08:02 10445 /lib/libz.so.1.2.3 00892000-00893000 rw-p 00011000 08:02 10445 /lib/libz.so.1.2.3 00a27000-00af4000 r-xp 00000000 08:02 17609 /usr/lib/libgfortran.so.3.0.0 00af4000-00af5000 rw-p 000cd000 08:02 17609 /usr/lib/libgfortran.so.3.0.0 00af5000-00af6000 rw-p 00af5000 00:00 0 00b08000-00b32000 r-xp 00000000 08:02 11567 /lib/libgcc_s-4.4.0-20090506.so.1 00b32000-00b33000 rw-p 00029000 08:02 11567 /lib/libgcc_s-4.4.0-20090506.so.1 00fe1000-00fe2000 r-xp 00fe1000 00:00 0 [vdso] 06965000-06986000 r-xp 00000000 08:02 17770 /usr/lib/libjpeg.so.62.0.0 06986000-06987000 rw-p 00021000 08:02 17770 /usr/lib/libjpeg.so.62.0.0 08048000-080e6000 r-xp 00000000 08:02 361556 /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF 080e6000-080e8000 rw-p 0009e000 08:02 361556 /export/home/orion/fedora/hdf/devel/HDF4.2r4/hdf/test/fortestF 080e8000-08143000 rw-p 080e8000 00:00 0 [heap] b7fde000-b7fe1000 rw-p b7fde000 00:00 0 bffea000-c0000000 rw-p bffea000 00:00 0 [stack] Program received signal SIGABRT, Aborted. 0x00fe1416 in __kernel_vsyscall () Missing separate debuginfos, use: debuginfo-install glibc-2.10.1-2.i686 libgcc-4.4.0-4.i586 libgfortran-4.4.0-4.i586 libjpeg-6b-45.fc11.i586 zlib-1.2.3-22.fc11.i586 (gdb) bt #0 0x00fe1416 in __kernel_vsyscall () #1 0x006e97c1 in raise () from /lib/libc.so.6 #2 0x006eb092 in abort () from /lib/libc.so.6 #3 0x00727dad in __libc_message () from /lib/libc.so.6 #4 0x007b5bd8 in __fortify_fail () from /lib/libc.so.6 #5 0x007b5b90 in __stack_chk_fail () from /lib/libc.so.6 #6 0x08059495 in an_check_lab_desc (filename= ../../gdb/gdbtypes.c:3135: internal-error: copy_type_recursive_1: Assertion `TYPE_OBJFILE (type) == objfile' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) n ../../gdb/gdbtypes.c:3135: internal-error: copy_type_recursive_1: Assertion `TYPE_OBJFILE (type) == objfile' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) y ) at tanf.f:227 #7 0x08059c87 in tanf (number_failed=0) at tanf.f:145 #8 0x0804ba94 in runcmd (cmd=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. ) at fortestF.f:223 #9 0x0804c560 in main () at fortestF.f:60 #10 0x080d10fb in main ()
Fixed (just removed the wrong assertion). This code is fortunately present now only in the F-11 variant of GDB.
gdb-6.8.50.20090302-38.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/gdb-6.8.50.20090302-38.fc11
Fixes my problem. Thanks!
Although, I do still see this: #8 0x0804ba94 in runcmd (cmd=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. ) at fortestF.f:223
gdb-6.8.50.20090302-38.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
Thanks, the comment 9 fix is checked-in the archer-jankratochvil-vla branch: http://sourceware.org/ml/archer/2009-q3/msg00159.html http://sourceware.org/gdb/wiki/ArcherBranchManagement (gdb) bt #0 0x00644430 in __kernel_vsyscall () #1 0x004fc7c1 in raise () from /lib/libc.so.6 #2 0x004fe092 in abort () from /lib/libc.so.6 #3 0x0053adad in __libc_message () from /lib/libc.so.6 #4 0x005c8d78 in __fortify_fail () from /lib/libc.so.6 #5 0x005c8d30 in __stack_chk_fail () from /lib/libc.so.6 #6 0x08059495 in an_check_lab_desc (filename='', tag=700, ref=2, label='', desc='', number_failed=0, _filename=64, _label=30, _desc=500) at tanf.f:227 #7 0x08059c87 in tanf (number_failed=0) at tanf.f:145 #8 0x0804ba94 in runcmd (cmd='Test', ' ' <repeats 11 times>, param='an', ' ' <repeats 28 times>, retcode=0, _cmd=15, _param=30) at fortestF.f:223 #9 0x0804c560 in main () at fortestF.f:60 #10 0x080d10fb in main () It will be present soon in Rawhide=F12 GDB. When/whether it will get fixed in F11 GDB I am not sure, optimized code debugging in general should be better supported first in F-12, such as by: http://gcc.gnu.org/wiki/Var_Tracking_Assignments
http://kojipkgs.fedoraproject.org/packages/gdb/6.8.50.20090818/7.fc12/src/gdb-6.8.50.20090818-7.fc12.src.rpm