Dear all,

I have found an exceptional portability issue when
building GNU lib for NexentaCore/i386-pc-solaris2.11.

Said system lacks the library call

   error (status, errno, format, ...)

which therefore is brought in from GNU lib.

However, should a programmer happen to erroneously write

   error (EXIT_FAILURE, EPERM, NULL);

nothing serious will happen on GNU/Linux with Glibc,
but for NexentaCore the GNU lib code will produce a
segmentation fault in

   gnulib/error.c:265 (error_tail)  vfprintf(stderr, NULL, args)

Seemingly the Solaris library can not recover from a NULL
format string. Some sort of runtime check might be of benefit
in error_tail() to prevent this crash. Observe that the setting

   #undef _LIBC

is in effect on this particular OpenSolaris instance, and
probably on all such systems.

Best regards,
  Mats Erik Andersson, GNU Inetutils

Reply via email to