[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45214: guile segfaults on 32-bit big-endian targets
From: |
John David Anglin |
Subject: |
bug#45214: guile segfaults on 32-bit big-endian targets |
Date: |
Tue, 9 Feb 2021 08:03:02 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2021-02-08 6:24 p.m., John David Anglin wrote:
> We need to investigate why scm_sum is passed "x=x@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@bell.net