Petrel2 and Linux

Linus Torvalds torvalds at linux-foundation.org
Sun Apr 17 12:57:07 PDT 2016


On Sun, Apr 17, 2016 at 12:42 PM, Miika Turkia <miika.turkia at gmail.com> wrote:
>
> Registers:
>  rax            0x0     0
>  rbx            0x7ffeef3a09d0  140732911978960
>  rcx            0x7ffeef3a09d0  140732911978960
>  rdx            0x7ffeef3a09d0  140732911978960
>
> SegvAnalysis:
>  Segfault happened at: 0x6a8d58 <dc_device_foreach+8>:  mov    0x30(%rax),%rax

Hmm.

dc_device_foreach is in libdivecomputer, and is a rather simple function.

I suspect that "device->vtable" is NULL.

>  #0  0x00000000006a8d58 in dc_device_foreach ()
>  No symbol table info available.
>  #1  0x0000000000652b02 in do_libdivecomputer_import ()
>  No symbol table info available.

The caller is do_libdivecomputer_import -> do_device_import, but
do_device_import is likely inlined.

I'm not seeing how device->vtable would be NULL, but it's either a
libdivecomputer bug, or it is, as you say, memory corruption.

              Linus


More information about the subsurface mailing list