URL: <https://savannah.gnu.org/patch/?10634>
Summary: [i386 fix] configure: do not make -Warray-bounds
fatal
Group: MIT/GNU Scheme
Submitter: barak
Submitted: Mon 28 Sep 2026 03:36:23 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:36:23 PM UTC By: Barak A. Pearlmutter <barak>
The i386 back end addresses half its compiled-code hooks at negative
offsets from Registers[], so that every hook fits in a byte offset;
cmpintmd/i386.c explains this and sets "offset = -128".
The storage is there: cmpint.c places "void * Regstart [32]"
immediately before Registers[] in a single struct. But cmpintmd/i386.c
sees only the "extern SCHEME_OBJECT Registers []" declaration, so gcc
reasons about the bounds from that alone and rejects all 44 of them:
cmpintmd.c:250:4: error: array subscript -6 is outside array bounds of
'SCHEME_OBJECT[536870911]' [-Werror=array-bounds]
This is fatal as the microcode is built with -Werror, so the i386
native build does not compile at all.
So we demote it to a warning, following the logic and placement of
-Wno-error=stringop-truncation. This does not make the access
conforming as it *is* still outside the Registers[] object. Addressing
it through the enclosing struct would be the real fix. This only stops
gcc's detection of an out-of-bounds error from being fatal.
_______________________________________________________
File Attachments:
Name: 0001-configure-do-not-make-Warray-bounds-fatal.patch Size: 1.7KiB
<https://file.savannah.gnu.org/file/0001-configure-do-not-make-Warray-bounds-fatal.patch?file_id=59038>
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/?10634>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
