1Issues to be addressed for src/util/et: -*- text -*- 2 3 4Non-thread-safe aspects: 5 6error_message uses a static buffer for "unknown error code" messages; 7a per-thread buffer may be better, but that depends on dynamic 8allocation working. A caller-provided buffer would be best, but 9that's a API change. 10 11initialize_foo_error_table uses a global linked list hung off an 12unprotected variable in the library. {add,remove}_error_table do 13likewise, but can be changed without externally visible effect. 14 15Workaround: Use a global lock for all calls to error_message and 16com_err, and when adding or removing error tables. 17 18 19API divergence: 20 21Transarc and Heimdal both have APIs that are different from this 22version. (Specifics?) 23 24Karl Ramm has offered to try to combine them. 25 26Workaround: 27 28 29Reference counting: 30 31If libraries are dynamically loaded and unloaded, and the init/fini 32functions add and remove error tables for *other* libraries they 33depend on (e.g., if a dynamically loadable Zephyr library's fini 34function removes the krb4 library error table and then dlcloses the 35krb4 library, while another dlopen reference keeps the krb4 library 36around), the error table is kept; a table must be removed the same 37number of times it was added before the library itself can be 38discarded. 39 40It's not implemented as a reference count, but the effect is the same. 41 42Fix needed: Update documentation. 43 44 4564-bit support: 46 47Values are currently computed as 32-bit values, sign-extended to 48"long", and output with "L" suffixes. Type errcode_t is "long". 49Kerberos uses a separately chosen signed type of at least 32 bits for 50error codes. The com_err library only look at the low 32 bits, so 51this is mostly just an issue for application code -- if anything 52truncates to 32 bits, and then widens without sign-extending, the 53value may not compare equal to the macro defined in the .h file. This 54isn't anything unusual for signed constants, of course, just something 55to keep in mind.... 56 57Workaround: Always use signed types of at least 32 bits for error 58codes. 59 60 61man page: 62 63No documentation on add_error_table/remove_error_table interfaces, 64even though they're the new, preferred interface. 65