Re:Out-of-bounds read and write in the glibc's qsort()
by microtherion on Monday February 05, 2024 @05:11PM
(#39267957)
In fact if an implementation of std::sort has this bug, it's worse, because a fix in a template function requires recompiling all clients to go into effect, while qsort can be fixed in one shared library.
Re:Out-of-bounds read and write in the glibc's qsort()
by ComputerGuru on Monday February 05, 2024 @03:12PM
(#39266458)
Never mind, you're right of course. I blanked for a moment there and completely forgot that you just need to use `std::stable_sort()` for non-deterministic comparison routines.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41448