Skip to content
Commit f0c1dedf authored by Andreas Jaeger's avatar Andreas Jaeger
Browse files

Fix tst-obprintf - and mcheck in general

tst-obprintf failed with GCC 4.7.

It turned out that this is the fault of GCC optimizing away the
following from malloc/mcheck.c:
      /* We call malloc() once here to ensure it is initialized.  */
      void *p = malloc (0);
      free (p);

gcc sees the malloc(0);free pair and removes it completely.

And now malloc is not properly initialized and we screw up if both
mcheck is used (via tst-obprintf) and MALLOC_CHECK_ is set (as it is in my
environment).
parent a65ef2ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment