Created attachment 132181 [details] fix for bug
Description of problem: In dwfl_module.c, compare_modules() has a 64 bit bug. The function returns the result of subtracting two addresses, which can be 64 bits long, but compare_modules returns an int because it is a comparison function for qsort. Comparing a main program module with a low address with a shared library mapped at a high address can return a wrong value. Version-Release number of selected component (if applicable): elf-0.120 How reproducible: This came up in Frysk when trying to find the source line of an address in a program. The search failed beacuse the modules weren't ordered properly. Additional info: See attachment for fix.
I applied the patch in a bit cleaned up way to the upstream code. It'll be fixed in the next rawhide release.
This is fixed in 0.122.