This helps prevent potential segfaults due to null-pointer
dereferencing in the face of errors when the plugin is accessed via
multiple threads.
If multiple threads are pushing errors onto the error stack then its
possible for elements of the various string pointer arrays to be left
NULL, causing a segfault when the stack is printed.
Whilst this does nothing to address the "correctness" of the plugin in
a multi-threaded context, at least it shouldn't crash.
Error messages may still be corrupted.
This will cause XDS to segfault on exit, since the plugin (and hence
HDF5 library) will likely have been unloaded.
Calling "H5dont_atexit" before any other H5 calls will prevent the
hook being installed, and we call "H5Close" ourselves as part of the
plugin_close function.
Error messages and function names/line numbers are traced via
__func__ or __FUNCTION__, __LINE__, etc (or just "unknown" if
not available). A manual stack is kept onto which these values
are pushed which can then be dumped to stderr/stdout.
stderr is used to report this information since no other
facility appears to be provided.
The get_frame code always assumed a dataset rank of three, so this
doesn't actually change much, but its one less dynamically allocated
buffer to keep track of.