GNU bug report logs -
#45214
guile segfaults on 32-bit big-endian targets
Previous Next
Full log
Message #38 received at submit <at> debbugs.gnu.org (full text, mbox):
On 2021-02-08 6:24 p.m., John David Anglin wrote:
> We need to investigate why scm_sum is passed "x=x <at> entry=0x0". SCM_BIGP (x) will fault on it. Maybe SP_REF is broken.
To be more specific, this is the type of sp:
(gdb) ptype sp
type = union scm_vm_stack_element {
uintptr_t as_uint;
uint32_t *as_vcode;
uint8_t *as_mcode;
SCM as_scm;
double as_f64;
uint64_t as_u64;
int64_t as_s64;
void *as_ptr;
scm_t_bits as_bits;
} *
(gdb) p/x &((union scm_vm_stack_element *)$r26)[0].as_scm
$11 = 0xf34147f0
(gdb) p/x &((union scm_vm_stack_element *)$r26)[1].as_scm
$12 = 0xf34147f8
(gdb) x/x 0xf34147f0
0xf34147f0: 0x00000001
(gdb) x/x 0xf34147f8
0xf34147f8: 0x0090020d
(gdb) p/x ((union scm_vm_stack_element *)$r26)[1].as_scm
$13 = 0x90020d
(gdb) p/x ((union scm_vm_stack_element *)$r26)[0].as_scm
$14 = 0x1
(gdb) x/8x 0xf34147f0
0xf34147f0: 0x00000001 0x00002c56 0x0090020d 0x0000097c
0xf3414800: 0x00000007 0x00000c83 0x0000097d 0x000d007f
There are endian aspects to consider in accessing the scm_vm_stack_element struct.
Dave
--
John David Anglin dave.anglin <at> bell.net
This bug report was last modified 3 years and 254 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.