|
From: Lee K. <lki...@cs...> - 2003-08-05 09:02:12
|
Bor...@pd... writes: > Don't get personal. I'am checking for Null-Pointers in my code...all I do > here is discuss a hypothetic case. I wasn't, but if your read it that way i'll apologise. > I think like valgrind works now it's not a well defined behavoiur (one term > you could know out of computer science), and all it should do is print > something like the following output: > > 'Null Pointer access: Write core [c/C]? Stop execution [s/S]? Continue on > own risk [r/R]?' > > Even a simple message from valgrind like the following would make the > situation clear: > > 'Your program has caused a memory fault.' > > After such a message every user should know, that It's his bug and not a > bug of valgrind. > > So to sum up: > My point is: an "Invalid read" followed by a core makes it not always clear > if this is a bug of valgrind or the tested programm. A short message to the > user before the core is written would make this situation more > clear. But Valgrind doesn't know that an "Invalid read" will go on to produce a core dump - many do not. I think a good position would be to assume the bugs are in your code? L. |