|
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 : :
+---------------------------------------+-----------------+
|
|
From: Dimitri Papadopoulos-O. <pap...@sh...> - 2005-03-09 09:43:31
|
Hi, > 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") You're using Valgrind 2.2.0, try the CVS version instead. Dimitri |
|
From: Nicholas N. <nj...@cs...> - 2005-03-09 14:13:39
|
On Wed, 9 Mar 2005, Dimitri Papadopoulos-Orfanos wrote: > You're using Valgrind 2.2.0, try the CVS version instead. Even easier, try 2.4.0 release candidate 1: http://www.goop.org/~jeremy/valgrind/dist> N |
|
From: Klint G. <kg...@kg...> - 2005-03-18 05:48:57
|
On Wed, 09 Mar 2005 10:43:21 +0100, Dimitri Papadopoulos-Orfanos <pap...@sh...> wrote: > Hi, > > > 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") > > You're using Valgrind 2.2.0, try the CVS version instead. ok. I got the 2.4.0 rc4 from http://www.goop.org/~jeremy/valgrind/dist/ and it gives "segmentation fault" too. The diagnostics look the same as the original post. Is there anything else I can generate to try and find out what's happening? klint. +---------------------------------------+-----------------+ : 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 : : +---------------------------------------+-----------------+ |
|
From: Jeremy F. <je...@go...> - 2005-03-18 07:33:32
|
Klint Gore wrote: >ok. I got the 2.4.0 rc4 from http://www.goop.org/~jeremy/valgrind/dist/ >and it gives "segmentation fault" too. > >The diagnostics look the same as the original post. Is there anything >else I can generate to try and find out what's happening? > Could you (re)post the full output of your valgrind command (with -v)? Also, if you can make the binary available, with any non-standard libraries it needs, available, that would help. J |
|
From: Klint G. <kg...@kg...> - 2005-03-21 22:50:58
Attachments:
test.txt
|
On Thu, 17 Mar 2005 23:33:22 -0800, Jeremy Fitzhardinge <je...@go...> wrote: > Klint Gore wrote: > > >ok. I got the 2.4.0 rc4 from http://www.goop.org/~jeremy/valgrind/dist/ > >and it gives "segmentation fault" too. > > > >The diagnostics look the same as the original post. Is there anything > >else I can generate to try and find out what's happening? > > > Could you (re)post the full output of your valgrind command (with -v)? > Also, if you can make the binary available, with any non-standard > libraries it needs, available, that would help. attached is version numbers, valgrind output, ldd on program, gbd backtrace, strace. The binary is at http://abri.une.edu.au/staff/klint/hello.bz2 I dont think there are any non standard libraries. If any of the following dont seem to be standard, let me know and I'll add them to the download. The versions for the ldd listed libraries are libNoVersion-2.3.2.so libpthread-0.10.so libdl-2.3.2.so libc-2.3.2.so ld-2.3.2.so thanks, klint. +---------------------------------------+-----------------+ : 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 : : +---------------------------------------+-----------------+ |
|
From: Jeremy F. <je...@go...> - 2005-03-21 23:10:24
|
Klint Gore wrote: >attached is version numbers, valgrind output, ldd on program, gbd >backtrace, strace. > >The binary is at http://abri.une.edu.au/staff/klint/hello.bz2 > > Ah, OK. This isn't actually a correctly formed executable: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x000a0 0x000a0 R E 0x4 INTERP 0x0000d4 0x080480d4 0x080480d4 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x06230 0x106230 R E 0x1000 ^^^^^^^ ^^^^^^^^ ^ LOAD 0x006230 0x0814f230 0x0814f230 0x00b50 0x01640 RW 0x1000 DYNAMIC 0x006cf8 0x0814fcf8 0x0814fcf8 0x00088 0x00088 RW 0x4 The segment at 0x08048000 is mapped read-only, but it has a file size smaller than the memory size; the space between these two is defined to be zeroed. However, because it is read-only, Valgrind crashes when trying to zero it. The kernel has a special workaround to deal with Kylix binaries by ignoring errors on that zero operation, but usermode code can't easily do that. I'll need to think about the nicest way to solve this (lobby Borland to generate proper executables would be a good start). Could you file a bug for this? J |
|
From: Jeremy F. <je...@go...> - 2005-03-21 23:21:41
|
Jeremy Fitzhardinge wrote:
>The kernel has a special workaround to deal with Kylix binaries by
>ignoring errors on that zero operation, but usermode code can't easily
>do that. I'll need to think about the nicest way to solve this (lobby
>Borland to generate proper executables would be a good start).
>
>
Turns out it was a simple fix. Try this out:
Index: valgrind/coregrind/ume.c
===================================================================
--- valgrind.orig/coregrind/ume.c 2005-03-10 21:09:43.000000000 -0800
+++ valgrind/coregrind/ume.c 2005-03-21 15:19:58.000000000 -0800
@@ -261,7 +263,7 @@ ESZ(Addr) mapelf(struct elfinfo *e, ESZ(
}
bytes = bss & (VKI_PAGE_SIZE - 1);
- if (bytes > 0) {
+ if ((prot & PROT_WRITE) && (bytes > 0)) {
bytes = VKI_PAGE_SIZE - bytes;
memset((char *)bss, 0, bytes);
}
|
|
From: Klint G. <kg...@kg...> - 2005-03-21 23:44:20
Attachments:
a.txt
|
On Mon, 21 Mar 2005 15:21:37 -0800, Jeremy Fitzhardinge <je...@go...> wrote: > Turns out it was a simple fix. Try this out: ok, that got me past the segmentation fault. I have an internal error (signal 8) and a message that the impossible happened. attached is the output. klint. +---------------------------------------+-----------------+ : 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 : : +---------------------------------------+-----------------+ |
|
From: Jeremy F. <je...@go...> - 2005-03-22 00:58:15
|
Klint Gore wrote:
>On Mon, 21 Mar 2005 15:21:37 -0800, Jeremy Fitzhardinge <je...@go...> wrote:
>
>
>>Turns out it was a simple fix. Try this out:
>>
>>
>
>ok, that got me past the segmentation fault. I have an internal error
>(signal 8) and a message that the impossible happened. attached is the
>output.
>
Run without -v, or try this patch:
Index: valgrind/coregrind/vg_from_ucode.c
===================================================================
--- valgrind.orig/coregrind/vg_from_ucode.c 2005-03-10 21:09:43.000000000 -0800
+++ valgrind/coregrind/vg_from_ucode.c 2005-03-21 16:56:59.000000000 -0800
@@ -154,6 +154,11 @@ static Histogram histogram[100];
void VG_(print_ccall_stats)(void)
{
+ if (ccalls == 0) {
+ VG_(message)(Vg_DebugMsg, " No ccalls");
+ return;
+ }
+
VG_(message)(Vg_DebugMsg,
" ccalls: %u C calls, %u%% saves+restores avoided"
" (%d bytes)",
J
|
|
From: Klint G. <kg...@kg...> - 2005-03-22 07:31:24
|
On Mon, 21 Mar 2005 16:58:08 -0800, Jeremy Fitzhardinge <je...@go...> wrote: > Run without -v, or try this patch: ok. that worked. I got a long list of things from a non-trivial program. Now to spend some time working out what it's telling me. thanks. klint. +---------------------------------------+-----------------+ : 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 : : +---------------------------------------+-----------------+ |
|
From: Jeremy F. <je...@go...> - 2005-03-22 07:58:02
|
Klint Gore wrote:
>ok. that worked.
>
>I got a long list of things from a non-trivial program. Now to spend
>some time working out what it's telling me.
>
Well, just from hello-world it looks like Kylix generates bad code - it
accesses memory below the stack pointer (hence the warning about
--workaround-gcc-296-bugs=yes).
J
|