Created attachment 396785 [details] dl.c sample code to demonstrate issue Description of problem: Calling dlclose twice with the same handle returns 0 (SUCCESS) despite the library having already been closed. If fact, dlclose will return 0 for all subsequent calls for the same handle. Version-Release number of selected component (if applicable): glibc-2.11.1-1 How reproducible: Always Steps to Reproduce: 1.Compile attached dl.c 2.Execute dl 3. Actual results: dlopen returned 153825312 dlclose call 1 returned 0 dlclose call 2 returned 0 Expected results: dlopen returned 146464800 dlclose call 1 returned 0 dlclose call 2 returned -1 dlclose call 2: ��: shared object not open Additional info: The problem occurs on F-12 with glibc-2.11.1-1. The expected results are produced on F-11 using glibc-2.10.2-1. The above problem stops asterisk initialising, since in main/loader.c, it uses the following code: while (!dlclose(lib)); On F-11, using glibc-2.10.2-1, the loop terminates once all instances of the library have been closed. On F-12 with glibc-2.11.1-1 the loop never terminates.
This is undefined behaviour.