On Tue, Oct 21, 2025 at 02:04:54AM -0400, Nikolaos Chatzikonstantinou wrote:

[...]

> Another way to trigger it is to run:
> 
>     (use-modules (system vm disassembler))
>     (disassemble-image (compile '(set-car! (0) 1) #:to 'bytecode))
> 
> The above makes it seem like it's not a permissions error but an
> out-of-bounds error, and indeed in a gdb session just after the
> segfault I see:
> 
>     (gdb) l
>     1928        {
>     1929          uint8_t obj, idx, val;
>     1930
>     1931          UNPACK_8_8_8 (op, obj, idx, val);
>     1932
>     1933          SCM_SET_CELL_OBJECT (SP_REF (obj), idx, SP_REF (val));
>     1934
>     1935          NEXT (1);
>     1936        }
>     (gdb) p SP_REF(obj)
>     Cannot access memory at address 0x7ffff7e09eb8
>     (gdb) info proc mappings
>     .
>     .
>     .
>     0x7ffff7e07000     0x7ffff7e09000     0x2000        0x0  rw-p
>     0x7ffff7e0a000     0x7ffff7e2a000    0x20000        0x0  rw-p
> 
> As you can see the memory address 0x7ffff7e09eb8 is not part of the
> mappings of the process as it lies between the above two listed
> mappings.

I'm not much into this and must hurry right now, but this seems
somewhat surprising. I'd have expected the memory to be in some
kind of read-only mapping...

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to