Crash on Save (was Re: Open Register crash on Solaris)
Derek Atkins
warlord at MIT.EDU
Wed Jun 4 13:51:40 CDT 2003
Nigel Titley <nigel at titley.com> writes:
> It works because in most cases a null pointer to a string is converted
> to a pointer to a null string or to "(null)". A static should be
> initialised to 0.
Nigel, clearly my sarcasm didn't make it across. I know why this
works _ON LINUX_... But printing a NULL pointer is not portable. My
exclamation of "how did this ever work" is based on the fact that this
code has been in every 1.8 release and nobody else has reported it,
and there is no way this has ever worked on Solaris (and probably
other platforms).
Your example was not necessary -- I know this behavior very well.
You will notice lots of places in the code where there is:
printf ("%s", foo ? foo : "(null)");
*I* added those! So I am well aware of the problem (and that it's
not a problem on Linux).
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list