ispras/llv8

Trace/breakpoint trap on an asm.js test

vivanishin opened this issue · 0 comments

Reproduce:

d8 --noturbo-asm --llvm-filter=* llv8-regtests/c++/407.js --noturbo-asm --llvm-filter=*

(cd llv8-regtests/c++ && make 407.js if you lack the file)

(gdb) disass $pc - 130, $pc + 30

   ...
   0x000026939469bf82:  call   0x2693942060a0
   0x000026939469bf87:  call   0x2693942060aa
   0x000026939469bf8c:  call   0x2693942060b4
   0x000026939469bf91:  call   0x2693942060c8
   0x000026939469bf96:  call   0x26939420605a
   0x000026939469bf9b:  int3   
   0x000026939469bf9c:  int3   
   0x000026939469bf9d:  int3   
=> 0x000026939469bf9e:  int3   
   0x000026939469bf9f:  int3   
   0x000026939469bfa0:  add    al,BYTE PTR [rax]
   0x000026939469bfa2:  add    BYTE PTR [rax],al
   0x000026939469bfa4:  add    eax,DWORD PTR [rax]
   0x000026939469bfa6:  add    BYTE PTR [rax],al

These int3 bytes are the alignment between the code and its safepoint table (see Code::CopyFrom). Control is not supposed to reach there.