URL:
  <https://savannah.gnu.org/patch/?10635>

                 Summary: [x32 fix] uxtrap.c: cast sigcontext registers
through uintptr_t
                   Group: MIT/GNU Scheme
               Submitter: barak
               Submitted: Mon 28 Sep 2026 03:38:14 PM UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Unlocked


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 28 Sep 2026 03:38:14 PM UTC By: Barak A. Pearlmutter <barak>
On Linux the registers in a signal context are greg_t, which is 64-bit
on every x86-64 kernel ABI, including x32, where a pointer is 32 bits.
Casting one straight to SCHEME_OBJECT * is then a narrowing cast between
an integer and a pointer, which gcc rejects:

  uxtrap.c:396:17: error: cast to pointer from integer of different size
                  [-Werror=int-to-pointer-cast]

fatal under the microcode's -Werror, so x32 does not compile at all.
Go through uintptr_t: a no-op where the two already agree, and on x32
the truncation is what is wanted, addresses there being 32 bits.






    _______________________________________________________
File Attachments:

Name: 0001-uxtrap.c-cast-sigcontext-registers-through-uintptr_t.patch Size:
2.1KiB

<https://file.savannah.gnu.org/file/0001-uxtrap.c-cast-sigcontext-registers-through-uintptr_t.patch?file_id=59039>



    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-124d8dfee8b67a705505b2fdb7e8134b8b23e116.tar.gz

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10635>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to