|
From: Josef W. <Jos...@gm...> - 2003-08-05 12:08:57
|
On Tuesday 05 August 2003 13:32, Nicholas Nethercote wrote: > On Tue, 5 Aug 2003, Josef Weidendorfer wrote: > > Back to Valgrind: > > Valgrind's SEGFAULT handler should give out a precise error message after > > a SEGFAULT is catched, that this was because of application code. > > Obviously, Valgrind already contains such a message when the SEGFAULT > > appears in Valgrind code. The addition should be easy. > > Ok, would you (and Borg) be happy if instead of saying this: For me personally, this is no big issue. I'm totally fine with the current situation (I'm not using Valgrind that often, mainly because I can't use Valgrind in my Valgrind skin ;-). But IMHO, the error message below is much more user friendly. > > ==8968== Invalid write of size 4 > ==8968== at 0x8048311: main (in /auto/homes/njn25/grind/annelid/a.out) > ==8968== by 0x8048264: ??? (start.S:81) > ==8968== Address 0x7BFFF77C is not stack'd, malloc'd or free'd > Segmentation fault (core dumped) > > Valgrind said something like: > > ==8968== Invalid write of size 4 > ==8968== at 0x8048311: main (in /auto/homes/njn25/grind/annelid/a.out) > ==8968== by 0x8048264: ??? (start.S:81) > ==8968== Address 0x7BFFF77C is not stack'd, malloc'd or free'd > Valgrind caught a segmentation fault in your program, see last error > message for an explanation of what caused it; aborting. > > ? > > Presumably, if the client program has its own SIGSEGV handler, Valgrind > couldn't do this. Isn't it possible to inject some trap into the programs SIGSEGV handler, to allow for the error message? Josef |