|
From: Klint G. <kg...@kg...> - 2005-03-09 00:22:07
|
I'm trying to use valgrind on a kylix "hello world" and it just says
"Segmentation fault" and exits. Any ideas? (it looks ok on "valgrind
--tool=none /bin/ls")
valgrind --tool=none ./hello
Segmentation fault
valgrind -v --tool=none ./hello
Segmentation fault
uname -a
Linux rumpole 2.4.20-31.9smp #1 SMP Tue Apr 13 17:40:10 EDT 2004 i686 i686 i386 GNU/Linux
valgrind --version
valgrind-2.2.0
cat hello.dpr
program hello;
begin
writeln('hello world');
end.
ldd hello
/lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40017000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40026000)
libdl.so.2 => /lib/libdl.so.2 (0x40078000)
libc.so.6 => /lib/libc.so.6 (0x4007c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
(gdb) backtrace full
#0 0xb10a40f7 in ?? ()
No symbol table info available.
#1 0xb000ba13 in ?? ()
No symbol table info available.
#2 0xb000bd9a in ?? ()
No symbol table info available.
#3 0xb000be01 in ?? ()
No symbol table info available.
#4 0xb00234dc in ?? ()
No symbol table info available.
#5 0xb00257c1 in ?? ()
No symbol table info available.
#6 0xb103d704 in ?? ()
No symbol table info available.
strace valgrind --tool=none ./hello >a.a 2>&1
execve("/usr/local/bin/valgrind", ["valgrind", "--tool=none", "./hello"], [/* 51 vars */]) = 0
uname({sys="Linux", node="rumpole", ...}) = 0
fcntl64(0, F_GETFD) = 0
fcntl64(1, F_GETFD) = 0
fcntl64(2, F_GETFD) = 0
geteuid32() = 503
getuid32() = 503
getegid32() = 503
getgid32() = 503
brk(0) = 0x80cfb78
brk(0x80d0b78) = 0x80d0b78
brk(0x80d1000) = 0x80d1000
getrlimit(0x9, 0xbfffed04) = 0
setrlimit(RLIMIT_AS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
open("/usr/local/lib/valgrind/stage2", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=1658766, ...}) = 0
geteuid32() = 503
getegid32() = 503
getgroups32(0x20, 0x80cb524) = 2
pread(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\4\276\0"..., 4096, 0) = 4096
pread(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\4\276\0"..., 52, 0) = 52
pread(3, "\6\0\0\0004\0\0\0004\0\0\2604\0\0\260\340\0\0\0\340\0\0"..., 224, 52) = 224
pread(3, "/lib/ld-linux.so.2\0", 19, 276) = 19
open("/lib/ld-linux.so.2", O_RDONLY|O_LARGEFILE) = 4
pread(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \f\0\000"..., 52, 0) = 52
pread(4, "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0iJ\1\0iJ\1\0\5\0\0\0\0"..., 96, 52) = 96
mmap2(0xb0000000, 532480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb0000000
mmap2(0xb0082000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x82) = 0xb0082000
mmap2(0xb0083000, 1417216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb0083000
mmap2(0xb1000000, 87796, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb1000000
mmap2(0xb1000000, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xb1000000
mmap2(0xb1015000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x15) = 0xb1015000
close(4) = 0
close(3) = 0
getpid() = 8500
open("/tmp/.pad.8500.1", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0) = 3
unlink("/tmp/.pad.8500.1") = 0
open("/proc/self/maps", O_RDONLY|O_LARGEFILE) = 4
read(4, "08048000-080ab000 r-xp 00000000 "..., 10240) = 558
close(4) = 0
mmap2(NULL, 134512640, PROT_NONE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0
mmap2(0x80d1000, 2817716224, PROT_NONE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x80d1000
mmap2(0xb01dd000, 14823424, PROT_NONE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb01dd000
open("/proc/self/exe", O_RDONLY|O_LARGEFILE) = 4
uname({sys="Linux", node="rumpole", ...}) = 0
set_tid_address(0) = 8500
brk(0) = 0x80d1000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=28672, ...}) = 0
open("/bin/lib/tls/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/tls/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/tls/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/tls/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/tls/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/tls/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/tls", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/bin/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/bin/lib", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/tls/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/tls/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/tls/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/tls/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/tls/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/tls/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/tls", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/kylix3/bin", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
open("/usr/local/pgsql/lib/tls/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/tls", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/i686/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/i686/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/i686/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/i686", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/mmx/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib/mmx", 0xbfffe5c0) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/pgsql/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=52448, ...}) = 0
old_mmap(NULL, 52448, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb1016000
close(5) = 0
open("/lib/libdl.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\30"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=15900, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb1023000
old_mmap(NULL, 13176, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xb1024000
old_mmap(0xb1027000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x2000) = 0xb1027000
close(5) = 0
open("tls/i686/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i686/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/kylix3/bin/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360W\1"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=1539996, ...}) = 0
old_mmap(0x42000000, 1267276, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xb1028000
old_mmap(0xb1158000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x130000) = 0xb1158000
old_mmap(0xb115b000, 9804, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb115b000
close(5) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb1023ac0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb1016000, 52448) = 0
getrlimit(RLIMIT_DATA, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_DATA, {rlim_cur=0, rlim_max=2147483647}) = 0
open("/home/klint/.valgrindrc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./.valgrindrc", O_RDONLY) = -1 ENOENT (No such file or directory)
brk(0) = 0x80d1000
brk(0x80d2000) = 0x80d1000
mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb115e000
open("/usr/local/lib/valgrind/vgskin_none.so", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\270\7\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=21341, ...}) = 0
old_mmap(NULL, 6848, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xb1016000
old_mmap(0xb1017000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0) = 0xb1017000
close(5) = 0
mprotect(0xb1016000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb1016000, 4096, PROT_READ|PROT_EXEC) = 0
access("/usr/local/lib/valgrind/vgpreload_none.so", R_OK) = -1 ENOENT (No such file or directory)
mmap2(0xaff00000, 1048576, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xaff00000
munmap(0, 2951741440) = 0
open("./hello", O_RDONLY) = 5
open("./hello", O_RDONLY|O_LARGEFILE) = 6
fstat64(6, {st_mode=S_IFREG|0775, st_size=29100, ...}) = 0
geteuid32() = 503
getegid32() = 503
getgroups32(0x20, 0xbfffdd50) = 2
pread(6, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\304\333"..., 4096, 0) = 4096
pread(6, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\304\333"..., 52, 0) = 52
pread(6, "\6\0\0\0004\0\0\0004\200\4\0104\200\4\10\240\0\0\0\240"..., 160, 52) = 160
pread(6, "/lib/ld-linux.so.2\0", 19, 212) = 19
open("/lib/ld-linux.so.2", O_RDONLY|O_LARGEFILE) = 7
pread(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \f\0\000"..., 52, 0) = 52
pread(7, "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0iJ\1\0iJ\1\0\5\0\0\0\0"..., 96, 52) = 96
mmap2(0x8048000, 28672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0x8048000
mmap2(0x804f000, 1048576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x804f000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
+---------------------------------------+-----------------+
: Klint Gore : "Non rhyming :
: EMail : kg...@kg... : slang - the :
: Snail : A.B.R.I. : possibilities :
: Mail University of New England : are useless" :
: Armidale NSW 2351 Australia : L.J.J. :
: Fax : +61 2 6772 5376 : :
+---------------------------------------+-----------------+
|