|
From: Paul A. C. <pa...@us...> - 2003-08-05 14:48:50
|
I'd suggest that these recent threads about Valgrind not detecting/reporting invalid write attempts to read-only memory are at least justifications for adding something either to the FAQ or to the documentation (section 2.12, "Limitations"?), or both. I could take a stab at it, if someone in the project thinks it worthwhile, and nobody volunteers. (I'm not an expert in the area, but this is probably only a couple of sentences, right?) Regards, Paul Clarke On Tue, 2003-08-05 at 05:02, Nicholas Nethercote wrote: > It's actually the assignment to x[5] that cause the seg fault. Run your > core file through gdb to see. The reason is that you're writing to > read-only memory. There was a thread on this mailing list about this just > the other day called "detect writing to TOC(?)". The (well, my) > conclusion was that, yes, writing to read-only memory can cause seg > faults, but they're rare and detecting them would have a big performance > cost, so it's not worth it. AFAIK, writing to read-only memory is the > only way a program can seg fault without Valgrind giving a warning first. ... > As I said, the dump for the program above is caused by writing to > read-only memory. On Tue, 2003-08-05 at 09:10, Igmar Palsenberg wrote: > I've already requested this feature, since writing to read-only memory in > threads isn't debuggable by both gdb and valgrind. At least telling me > that the write is to read-only memory would help :) |