unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: glaubitz@physik.fu-berlin.de, 45214@debbugs.gnu.org
Subject: bug#45214: guile segfaults on 32-bit big-endian targets
Date: Tue, 9 Feb 2021 08:03:02 -0500	[thread overview]
Message-ID: <8142cce6-de86-c258-0182-4f3309f358c1@bell.net> (raw)
In-Reply-To: <1aa5495b-71ed-d715-d253-b4e5675fabcb@bell.net>

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






      reply	other threads:[~2021-02-09 13:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12 21:26 bug#45214: guile segfaults on 32-bit big-endian targets John Paul Adrian Glaubitz
2020-12-12 22:00 ` John David Anglin
2020-12-12 22:02   ` John Paul Adrian Glaubitz
2021-02-25 15:24     ` Efraim Flashner
2021-04-14 14:18       ` Efraim Flashner
2021-04-14 19:19         ` John Paul Adrian Glaubitz
2021-04-15 11:50           ` Efraim Flashner
2021-04-15 13:23             ` John Paul Adrian Glaubitz
2021-10-03  9:38         ` John Paul Adrian Glaubitz
2021-10-04 16:08           ` John David Anglin
2021-10-04 16:11             ` John Paul Adrian Glaubitz
2020-12-12 22:21 ` John David Anglin
2020-12-12 22:30   ` John David Anglin
2020-12-12 22:44     ` John David Anglin
2020-12-12 22:47       ` John Paul Adrian Glaubitz
2020-12-12 23:22         ` John David Anglin
2020-12-13 18:06         ` John David Anglin
2020-12-13 18:08           ` John Paul Adrian Glaubitz
2021-02-08 23:24   ` John David Anglin
2021-02-09 13:03     ` John David Anglin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8142cce6-de86-c258-0182-4f3309f358c1@bell.net \
    --to=dave.anglin@bell.net \
    --cc=45214@debbugs.gnu.org \
    --cc=glaubitz@physik.fu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).