View previous topic :: View next topic |
Author |
Message |
pablo_supertux Advocate
Joined: 25 Jan 2004 Posts: 2931 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Tue Mar 10, 2009 3:29 pm Post subject: valgrind und suppress files [solved] |
|
|
hi
eine neue glibc installiert (sys-libs/glibc-2.8_p20080602-r1) und schon meckert valgrind wieder...
Code: |
$ cat main.c
int main(void)
{
return 0;
}
$ gcc main.c -omain
$ valgrind ./main
...
==9164== Conditional jump or move depends on uninitialised value(s)
==9164== at 0x400A531: (within /lib/ld-2.8.so)
==9164== by 0x400398F: (within /lib/ld-2.8.so)
==9164== by 0x4013C05: (within /lib/ld-2.8.so)
==9164== by 0x4000DEF: (within /lib/ld-2.8.so)
==9164== by 0x4000986: (within /lib/ld-2.8.so)
==9164==
==9164== Conditional jump or move depends on uninitialised value(s)
==9164== at 0x400A673: (within /lib/ld-2.8.so)
==9164== by 0x400398F: (within /lib/ld-2.8.so)
==9164== by 0x4013C05: (within /lib/ld-2.8.so)
==9164== by 0x4000DEF: (within /lib/ld-2.8.so)
==9164== by 0x4000986: (within /lib/ld-2.8.so)
==9164==
==9164== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
==9164== malloc/free: in use at exit: 0 bytes in 0 blocks.
==9164== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==9164== For counts of detected errors, rerun with: -v
==9164== Use --track-origins=yes to see where uninitialised values come from
==9164== All heap blocks were freed -- no leaks are possible.
|
Nach ein bisschen Recherche habe ich erfahren, dass man sogenannte suppress files erstellen kann, mit denen man diese Fehler/Warnungen, für die man nix kann, ausschalten kann. Hab dann
Code: |
$ valgrind --gen-suppressions=all ./main
|
ausgeführt und valgrind hat mir dann freundlicherweise selber die suppression codes ausgegeb, woraus ich folgendes gebastelt habe:
Code: |
$ cat glibc-2.8.supp
{
Gentoo-glib-2_8
Memcheck:Cond
obj:/lib/ld-2.8.so
obj:/lib/ld-2.8.so
obj:/lib/ld-2.8.so
obj:/lib/ld-2.8.so
obj:/lib/ld-2.8.so
obj:*
obj:*
obj:*
obj:*
}
|
aber wenn ich valgrind --suppressions=./glibc-2.8.supp ./main ausführe, dann kommen die Conditional jumps wieder
was habe ich übersehen? _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Last edited by pablo_supertux on Tue Mar 10, 2009 4:00 pm; edited 1 time in total |
|
Back to top |
|
|
pablo_supertux Advocate
Joined: 25 Jan 2004 Posts: 2931 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Tue Mar 10, 2009 4:00 pm Post subject: |
|
|
ok, hab mir die Doku angeschaut und bemerkt, dass meine Rule so nicht ganz richtig ist. Hab sie jetzt so geändert und nun tut's:
Code: |
{
Gentoo-glib-2_8
Memcheck:Cond
obj:/lib/ld-2.8.so
...
obj:/lib/ld-2.8.so
}
|
_________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|