2006.09.22 14:20 "[Tiff] libjpeg", by Philip Watkinson

2006.09.22 18:16 "Re: [Tiff] libjpeg", by Bob Friesenhahn

Here, my comment on your other mail, that longjmp is not a part of LibJpeg but at most one of the options at the disposal of caller implementation, does not work, as longjump *is* a part of tif_jpeg and tif_ojpeg.

So I'm left with two questions

  1. Is the longjmp system really unsafe? I mean nowadays, on most systems, as opposed to being unsafe on one or two systems a decade ago.
  2. If this really is an issue, are exceptions a good alternative? Or do Linux guys not have exceptions? Are exceptions portable?

As I mentioned, it is system dependent. The system I use daily documents these interfaces to be not thread safe. Others do the same, or don't document thread safety issues at all.

Exceptions require using C++ (to throw and catch the exception) and compiling the library (or at least linking it) using a C++ compiler. It used to be that some C++ exception implementations were not thread safe but current ones seem to be thread safe. C++ exceptions are pretty portable on modern systems using modern compilers since they are part of the C++ standard.

Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/