« Return to Thread: Small question about segfaults
Hi,
in a C program, does the program send a SIGSEV signal (so ends with a
"Segmentation fault") immediately when you try to read or write in a
non-allocated memory, or does it do so only when it reads/writes in a
forbidden location, allocated for another program? What I means is: if you
go out of your allocated memory, but this segment belongs to no other
processus, then will it segfault?
I am trying to understand such a violation in the utf-8 branch, I found the
line where it segfaults with valgring/gdb, but don't manage to find why the
pointer was not allocated (my first verification seem to conclude it should
be allocated), and why it does not always segfault to the same line/column
for the exact same action.
And for gdb experts (or valgrind, or any other debugging program), do you
know if it is possible to focus on one pointer-variable, and follow its
memory allocation/liberation and size in the program run?
Thanks.
Jehan
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Materm-devel mailing list
Materm-devel@...
https://lists.sourceforge.net/lists/listinfo/materm-devel
mrxvt home page: http://materm.sourceforge.net
« Return to Thread: Small question about segfaults
| Free embeddable forum powered by Nabble | Forum Help |