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

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

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?

A possible solution is for libtiff to become aware of operating system semaphores/mutexes and carefully use locks to ensure that the problem APIs are invoked safely.

Libtiff itself is not compiled to ensure thread safety on many platforms since often special compilation flags are required in order to ensure that thread safe interfaces are used. For example, a thread-safe build may use a thread-specific errno (accessed via functions) while the default build may use a simple global integer. This is also a platform dependent issue.

The above is also true for libjpeg and zlib.

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