This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH v2] Support %m in printf functions


> > GLIBC conversion of NULL to "(null)" has delayed detection of a bug
> in
> > code of mine.  I would much prefer %s conversion to dump core, either
> > as a side effect of dereferencing NULL or by call of abort().
> 
> Strange.  It had already helped me a lot since it doesn't just crash at
> some point in the C library, but the unexpected string value showed
> pretty clearly what the bug was.

Debuggers have a stack back trace feature which show what arguments user-written code has passed to library routines.  This works for core dumps as well -- though perhaps not for Cygwin.

In this case, the "(null)" was buried in a file destined for machine consumption.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]