efone
January 25th, 2009, 09:54 AM
Hi guys,
When I compile and link my code on my gentoo box everything works fine and the program runs fine.
At work I have a ubuntu box and I need to run the same code, when I compile and link it everything seems fine; however, when I start it I get a segmentation fault. I use gfortran and upon checking with gdb I get:
(gdb) bt
#0 0xb7d94b6a in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7f4a653 in *_gfortrani_write_a (dtp=0xbf98d558, f=0x9f6f59c,
source=0xbf98d688 'Hello \000', len=8) at /usr/include/bits/string3.h:52
#2 0xb7f42cb8 in formatted_transfer_scalar (dtp=0xbf98d558,
type=<error reading variable>, p=0xbf98d688, len=8, size=8)
at ../../../src/libgfortran/io/transfer.c:1041
#3 0xb7f4305e in formatted_transfer (dtp=0xbf98d558,
type=<error reading variable>, p=0xbf98d688, kind=8, size=8, nelems=1)
at ../../../src/libgfortran/io/transfer.c:1378
#4 0xb7f3f396 in *_gfortran_transfer_character (dtp=0x2, p=0x20f6d515, len=5)
at ../../../src/libgfortran/io/transfer.c:1434
#5 0x0804894b in simple () at simple.f:12
#6 0x080489d9 in main ()
#7 0xb7d32685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#8 0x08048701 in _start ()
Any idea on how I can fix this? Maybe something wrong with libc? By the way, I couldnt figure out how to include libc symbols for debuging in ubuntu.
Any help is highly appreciated.
Thanks in advance.
Efo
When I compile and link my code on my gentoo box everything works fine and the program runs fine.
At work I have a ubuntu box and I need to run the same code, when I compile and link it everything seems fine; however, when I start it I get a segmentation fault. I use gfortran and upon checking with gdb I get:
(gdb) bt
#0 0xb7d94b6a in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7f4a653 in *_gfortrani_write_a (dtp=0xbf98d558, f=0x9f6f59c,
source=0xbf98d688 'Hello \000', len=8) at /usr/include/bits/string3.h:52
#2 0xb7f42cb8 in formatted_transfer_scalar (dtp=0xbf98d558,
type=<error reading variable>, p=0xbf98d688, len=8, size=8)
at ../../../src/libgfortran/io/transfer.c:1041
#3 0xb7f4305e in formatted_transfer (dtp=0xbf98d558,
type=<error reading variable>, p=0xbf98d688, kind=8, size=8, nelems=1)
at ../../../src/libgfortran/io/transfer.c:1378
#4 0xb7f3f396 in *_gfortran_transfer_character (dtp=0x2, p=0x20f6d515, len=5)
at ../../../src/libgfortran/io/transfer.c:1434
#5 0x0804894b in simple () at simple.f:12
#6 0x080489d9 in main ()
#7 0xb7d32685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#8 0x08048701 in _start ()
Any idea on how I can fix this? Maybe something wrong with libc? By the way, I couldnt figure out how to include libc symbols for debuging in ubuntu.
Any help is highly appreciated.
Thanks in advance.
Efo