|
From: Philippe W. <phi...@sk...> - 2011-12-16 18:47:25
|
> # gcc -lpthread -o threads threads.c Not too sure the license of this code allows it to be posted .... but ok, I just compiled it, did not read it and have zero intention to use it for any purpose :). > Question the sample has the issues like > 1)accessing like uninitialsed variable. There is a deliberate choice in memcheck (to avoid too many false positive) that just accessing uninit variable does not cause an error. To report an error, the uninit variable access must modify the "external behaviour" of the program. E.g. if you do a "jump" based on this uninit data or use it in a syscall (e.g. write) or use it to compute another address (e.g. when as index in an array), then you will get an error. > 2)write overflow. The tool exp-sgcheck is checking write overflow of stack or global arrays. Philippe |