|
From: Naveen K. <g_n...@ya...> - 2005-08-10 21:31:27
|
sysenter hacked to go int $0x91 route.
cat > main.c
int main()
{
printf("Hello World\n");
}
gcc -g -o main main.c
valgrind --error-limit=no --run-libc-freeres=no main
[copyright info]
[zillions of errors in ld.so]
Hello World
[some more errors in ld.so]
[error summary]
cat > malloc.c
int main()
{
char *p = malloc(10);
p[11] = 0;
}
gcc -g -o malloc malloc.c
valgrind --error-limit=no --run-libc-freeres=no main
[copyright info]
[zillions of errors in ld.so]
==315650== Invalid write of size 1
==315650== at 0x805089E: main (malloc.c:6)
==315650== Address 0x22691033 is 1 bytes after a
block of size 10 alloc'd
==315650== at 0x225A1C20: malloc
(vg_replace_malloc.c:151)
[error summary]
==315650== LEAK SUMMARY:
==315650== definitely lost: 10 bytes in 1 blocks.
==315650== possibly lost: 0 bytes in 0 blocks.
==315650== still reachable: 0 bytes in 0 blocks.
==315650== suppressed: 0 bytes in 0 blocks.
cat > main1.c
void main()
{
int a;
printf("Hello World %d\n",a);
}
gcc -g -o main1 main1.c
valgrind --error-limit=no --run-libc-freeres=no main1
[copyright info]
[zillions of errors in ld.so]
==315668== Syscall param write(buf) points to
uninitialised byte(s)
==315668== at 0x22645C65: _write (in
/lib/libc.so.1)
==315668== Address 0x2268FF44 is not stack'd,
malloc'd or (recently) free'd
hello world 576129024
[error summary]
So far so good. Only problem is the zillions of errors
in ld.so. I dont know yet if they are actual errors or
false positives. By the time I reach the exe's main
there are more than 300 errors so V doesn't show full
stack trace. I tried to suppress all errors in ld.so
but still I dont get the full stack trace for the main
exe's errors. C++ programs dont run yet under
valgrind.
Cheers, for now.
Naveen
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|