On Mon, 14 Nov 2005, Orna Agmon wrote:

To all those who attended the lecture I gave today, on Free Software
Tools:

In the file we compiled and tested using valgrind, we had some
un-explained errors, in the form of:

==28161== Conditional jump or move depends on uninitialised value(s)
==28161==    at 0x1B8EC7D3: (within /lib/ld-2.3.5.so)
==28161==    by 0x1B8E631C: (within /lib/ld-2.3.5.so)
==28161==    by 0x1B8F2BDD: (within /lib/ld-2.3.5.so)
==28161==    by 0x1B8E7675: (within /lib/ld-2.3.5.so)
==28161==    by 0x1B8E47C6: (within /lib/ld-2.3.5.so)

Valgrind would not tell anything more about the stack, and would not tell
anything about our simple source file:

#include <stdio.h>
#include <stdlib.h>
int main(void){
       unsigned char a='a';
       int *example;

       example = (int *)malloc(100*sizeof(int));
       example = (int *)malloc(100*sizeof(int));

       return 0;
}

The problem was in the version of valgrind which was installed on my home
computer. An updated version of valgrind does not report these weird
messages.

Please limit the spread of misinformation to your lecture.
  The true reason for these messages is the fact that valgrind does not
suppress certain errors generated by glibc and the linux dynamic loader. You
have probably upgraded your standard libraries without upgrading valgrind's
suppression files.
  More importantly, the reason that the memory leaks were not detected was
the fact that valgrind was run without the --leak-check=full flag, and thus
leaks were only counted but not reported.

  Alon

--
This message was sent by Alon Altman ([EMAIL PROTECTED]) ICQ:1366540
GPG public key at http://8ln.org/pubkey.txt
Key fingerprint = A670 6C81 19D3 3773 3627  DE14 B44A 50A3 FE06 7F24
--------------------------------------------------------------------------
 -=[ Random Fortune ]=-
Your own mileage may vary.

--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to