On linux, what can cause dlopen to emit SIGFPE?

I have a library of dubious sources, which is identified fileas a 32-bit executable. However, when I try dlopenon a 32-bit CentOS 4.4 machine, dlopen ends with SIGFPE. Of course, if something is wrong with the binary file format, then dlopenshould it handle the error?

So the question is: what problems can cause the Dlopen SIGFPE surge?

+3
source share
1 answer

Possible reasons:

  • Division by zero (the rule is with gdb)
  • Architecture mismatch (did you compile DSO yourself on the same architecture?) Or
  • ABI ( DSO, Linux ).

- ELF GNU, ABI SIGFPE , DSO, /.

GDB

]$ gdb ./my_executable
(gdb) run

,

(gdb) bt

do_lookup_x (), , , , , DSO , ... , , , , ABI, .

/ !;)

+5

Source: https://habr.com/ru/post/1742434/


All Articles