• Nils Goroll's avatar
    do not pass a NULL pointer from strerror() to vsnprintf via VSL · ee33662a
    Nils Goroll authored
    (at leat on solaris) strerror() itself may fail for an out-of-memory
    condition (because the localization code contains memory
    allocations). In order to handle this situation, we need to save the
    original errno because strerror() may also set errno.
    
    This issue exists in many more places all over the code, but in the
    pool_breed case we likely failed pthread_create for an out-of-memory
    condition, and in the panic handler we want to make sure that we
    trip no follow-up panic under any circumstances.
    
    In general, while fixing all strerror() calls would unnecessarily
    complicate the code, doing so should be justified for these cases.
    
    Fixes #2815
    ee33662a
cache_wrk.c 15.6 KB