[Openmcl-devel] Illegal Instruction in CCL 1.11.5 on Musl Libc

Waldek Hebisch hebisch at math.uni.wroc.pl
Wed Dec 18 09:59:38 PST 2019


> 
> Looking at the disassembly of remap_spjump I'm seeing:
> 
> (gdb) disass remap_spjump
> Dump of assembler code for function remap_spjump:
> Address range 0x415630 to 0x415676:
>    0x0000000000415630 <+0>:     sub    $0x8,%rsp
>    0x0000000000415634 <+4>:     xor    %r9d,%r9d
>    0x0000000000415637 <+7>:     mov    $0xffffffff,%r8d
>    0x000000000041563d <+13>:    mov    $0x32,%ecx
>    0x0000000000415642 <+18>:    mov    $0x3,%edx
>    0x0000000000415647 <+23>:    mov    $0x1000,%esi
>    0x000000000041564c <+28>:    mov    $0x15000,%edi
>    0x0000000000415651 <+33>:    callq  0x40d2e0 <mmap at plt>
>    0x0000000000415656 <+38>:    cmp    $0xffffffffffffffff,%rax
                                  ^^^^^^
>    0x000000000041565a <+42>:    jne    0x40d6f4 <remap_spjump+4294934724>
>    0x0000000000415660 <+48>:    lea    0x12ae2(%rip),%rdi        # 0x428149
>    0x0000000000415667 <+55>:    callq  0x40d1c0 <perror at plt>
>    0x000000000041566c <+60>:    mov    $0x1,%edi
>    0x0000000000415671 <+65>:    callq  0x40d600 <_exit at plt>
> Address range 0x40d6f4 to 0x40d6f6:
> => 0x000000000040d6f4 <+-32572>:        ud2
> End of assembler dump.
> 
> I wish I was more familiar with C, most of this I'm only roughly
> familiar with. I don't see anything that immediately jumps out as
> problematic,  but maybe someone with a more seasoned eye would.

Looks like failing memory allocation.  After that openmcl tries to
print error message and exit.  But maybe things are so horribly
broken that calls go to different functions.  I would suggest
using 'strace'.  If at end of dump you see call to mmap, then
you may get some info.  If not, things got messed up earlier.

To debug this you need almost no C knowledge, you need to work
at assebler level.  Anyway, to go forward you need somebody more
familiar with Openmcl (I worked on runtimes for other systems,
but not on Openmcl).

-- 
                              Waldek Hebisch



More information about the Openmcl-devel mailing list