segment fault when execute LLVM MCJIT generate machine code

83 Views Asked by At

check the _siginfo, si_code is 2

(gdb) p $_siginfo
$2 = {si_signo = 11, si_errno = 0, si_code = 2, _sifields = {_pad = {1254290016, 32642, 0 <repeats 26 times>}, _kill = {
      si_pid = 1254290016, si_uid = 32642}, _timer = {si_tid = 1254290016, si_overrun = 32642, si_sigval = {sival_int = 0,
        sival_ptr = 0x0}}, _rt = {si_pid = 1254290016, si_uid = 32642, si_sigval = {sival_int = 0, sival_ptr = 0x0}},
    _sigchld = {si_pid = 1254290016, si_uid = 32642, si_status = 0, si_utime = 0, si_stime = 0}, _sigfault = {
      si_addr = 0x7f824ac2f260}, _sigpoll = {si_band = 140197576766048, si_fd = 0}}}
    /* `si_code' values for SIGSEGV signal.  */
enum
{
  SEGV_MAPERR = 1,                /* Address not mapped to object.  */
# define SEGV_MAPERR        SEGV_MAPERR
  SEGV_ACCERR                        /* Invalid permissions for mapped object.  */
# define SEGV_ACCERR        SEGV_ACCERR
};

Invalid permissions for mapped object

I have checked the core file, use disas to print the asm code, This address can be accessed normally and there is no different with my local code.

I checked the other thread, found that there is anoter thread is just compiling machine code, so maybe it's the influence of this?

0

There are 0 best solutions below