Problems with dmalloc5

Dale Amon amon at vnl.com
Tue Mar 27 21:20:44 UTC 2012


Okay, I think I've put the ball firmly in your
court.

Here is the test program:

-----------------------------------------------------
#include        <objc/Object.h>
#include        <dmalloc.h>

main (int argc, char *argv[]) {
  size_t len;
  char *fname;
  char *rootname = "TESTFILE";

  len   = strlen (rootname) + 1;
  fname = (char *) calloc (len,1);

  printf ("rootname=%s len=%d\n", rootname,len);
}
-----------------------------------------------------

Compiled with this line:

	gcc -o tst tst.m -ldmalloc

and it gives this result:

$ ./tst
rootname=TESTFILE len=9
Segmentation fault

-----------------------------------------------------

System is a Thinkpad T40 with up to date Oneiric.




More information about the Ubuntu-devel-discuss mailing list