qsort() isn't thread safe
Issue
- In RHEL5, a multi-threaded application using the qsort() function may dump core with a floating point exception. We found out that RHEL6 has the same problem.
- The qsort() function is not listed as "need not be thread-safe" functions in POSIX.1-2008, "2.9.1 Thread-Safety". So it shall be thread-safe and be safely available in the multi-threaded application.
- This problem is already fixed in the latest upstream glibc(<= 2.12.2).
http://sourceware.org/bugzilla/show_bug.cgi?id=11655
Environment
- Red Hat Enterprise Linux 5.8
- glibc-2.5-81(RHEL5.8)
- Red Hat Enterprise Linux 6.3
- glibc-2.12-1.80(RHEL6.3)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.