#0 0xb7873b71 in memcpy () from /lib/tls/i686/cmov/libc.so.6
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:
#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)
#3 0xb7f4305e in formatted_transfer (dtp=0xbf98d558,
type=<error reading variable>, p=0xbf98d688, kind=8, size=8, nelems=1)
#4 0xb7f3f396 in *_gfortran_transfer_character (dtp=0x2, p=0x20f6d515, len=5)
#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.
Last edited by Efo; 01-26-2009 at 07:10 PM.