AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
October 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.10.22 13:47 "checking test images", by <ryuki_dono@yahoo.de>
2005.10.25 11:25 "Re: checking test images", by <ryuki_dono@yahoo.de>
2005.10.25 13:38 "Re: checking test images", by Frank Warmerdam
2005.10.25 14:37 "Re: checking test images", by Bob Friesenhahn
2005.10.26 12:06 "Re: checking test images", by <ryuki_dono@yahoo.de>
2005.10.26 14:43 "Re: checking test images", by Frank Warmerdam
2005.10.26 17:47 "Re: checking test images", by <ryuki_dono@yahoo.de>
2005.10.26 18:05 "Re: checking test images", by Bob Friesenhahn
2005.10.26 18:59 "Re: checking test images", by Joris Van Damme
2005.10.26 19:47 "Re: checking test images", by Bob Friesenhahn
2005.10.26 21:38 "Re: checking test images", by <ryuki_dono@yahoo.de>
2005.10.26 22:06 "Re: checking test images", by Frank Warmerdam

2005.10.26 18:05 "Re: checking test images", by Bob Friesenhahn

> The thing with the errormanager... There isn't much help with it in the man 
> pages. I tried to find help with the provided sources of tools. I tried to  
> compare  it with jpeg.lib and png.lib that use a similar system. Jpeg.lib uses 
> longjump and a jumpbuffer to jump from the errorhandler function to a block of 
> instruction. Png.lib uses exceptions and/or longjumps in the same manner. 
> Since both keep track of allocated memory and provide "abort and cleanup" 
> functions it is save (?) that way. I only used the png approach with try and 
> catch. Thank you for your notes. I will try and see if I can cleanup my code 
> some more.

The libjpeg and libpng approach is definitely not "safe".  It requires 
that the library and library user take great care in order to make 
sure that memory is not leaked.  Use of setjmp/longjmp is not trivial 
by any means and they are not assured to be thread safe. 
Setjmp/longjmp are based on platform/CPU specific implementations 
which play tricks with the stack and CPU registers.

For C language, I definitely prefer synchronous error handling rather 
than asynchronous.  C++ is another matter entirely since the language 
provides what is needed to ensure that allocated data can be safely 
destroyed in exception-safe code.

Bob