Description of problem: Segment fault when call log4c_init twice. Version-Release number of selected component (if applicable): 1.2.4 How reproducible: Steps to Reproduce: 1. call log4c_init 2. call log4c_fini 3. call log4c_init Actual results: Step 3 run sucessfully. Expected results: Segment fault & core dump Additional info: The code is below: static sd_hash_t* log4c_layout_types(void) { static sd_hash_t* types = NULL; if (!types) types = sd_hash_new(20, NULL); return types; } extern void log4c_layout_types_free( void ) { sd_hash_t * types = log4c_layout_types(); if ( types != NULL ) { sd_hash_delete( types ); } } "types" in function log4c_layout_types_free has delete, but the pointer need to be set to nullptr. It need to change to code below: static sd_hash_t* types = NULL; static sd_hash_t* log4c_layout_types(void) { if (!types) types = sd_hash_new(20, NULL); return types; } extern void log4c_layout_types_free( void ) { //sd_hash_t * types = log4c_layout_types(); if ( types != NULL ) { sd_hash_delete( types ); } types = NULL; } The bug is existed in all packages, neither Fedora EPEL or EPEL for RHEL, in verison 1.2.4。
Bug in rawhide also.
FEDORA-EPEL-2021-0afde3da1b has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-0afde3da1b
FEDORA-EPEL-2021-0afde3da1b has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-0afde3da1b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Conrect: Expected results: Step 3 run sucessfully. Actual results: Segment fault & core dump And this BUG is also appeared in epel6 & epel8. They should be fixed anyway.
For EPEL7, the fix is in the testing repository. Fedora branches and EPEL8 should be OK.
FEDORA-EPEL-2021-0afde3da1b has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report.