GNU bug report logs -
#71891
Compiler error building 3.0.10 on 32-bit platforms
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71891 in the body.
You can then email your comments to 71891 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#71891
; Package
guile
.
(Tue, 02 Jul 2024 02:10:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rob Browning <rlb <at> defaultvalue.org>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Tue, 02 Jul 2024 02:10:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
First noticed via https://buildd.debian.org/guile-3.0 on armel, armhf
and i386:
https://buildd.debian.org/status/fetch.php?pkg=guile-3.0&arch=armel&ver=3.0.10-1&stamp=1719706962&raw=0
https://buildd.debian.org/status/fetch.php?pkg=guile-3.0&arch=armhf&ver=3.0.10-1&stamp=1719706478&raw=0
https://buildd.debian.org/status/fetch.php?pkg=guile-3.0&arch=i386&ver=3.0.10-1&stamp=1719703034&raw=0
They all failed to build like this:
GUILE_BOOTSTRAP_STAGE=stage1 ../meta/build-env guild compile --target="i686-pc-linux-gnu" -W1 -O2 -Ono-cross-module-inlining -L "/<<PKGBUILDDIR>>/module" -o "ice-9/calling.go" "../module/ice-9/calling.scm"
Backtrace:
In ice-9/boot-9.scm:
1755:12 19 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In system/base/compile.scm:
69:11 18 (_)
190:11 17 (_ #<closed: file 42e38>)
309:6 16 (read-and-compile #<closed: file 42e70> #:from _ #:to _ #:env _ #:optimization-level _ #:warning-level _ #:opts _)
352:28 15 (compile #<tree-il (seq (let (m) (m-182b3cf1-2) ((call (@@ (guile) define-module*) (const (language cps guile-vm reify-primitives)) (const #:filename) (const "language/cps/guile-vm/reify-primitives.scm") (const #:imports) (const (((ice-9 match)) ((language tree-il primitives) #:select ((primitive-module . tree-il:primitive-module))) ((language cps)) ((language cps utils)) ((language cps with-cps)) ((language cps intmap)) ((language bytecode)) ((system base target)) ((system bas?> ?)
265:44 14 (_ #<tree-il (seq (let (m) (m-182b3cf1-2) ((call (@@ (guile) define-module*) (const (language cps guile-vm reify-primitives)) (const #:filename) (const "language/cps/guile-vm/reify-primitives.scm") (const #:imports) (const (((ice-9 match)) ((language tree-il primitives) #:select ((primitive-module . tree-il:primitive-module))) ((language cps)) ((language cps utils)) ((language cps with-cps)) ((language cps intmap)) ((language bytecode)) ((system base target)) ((system base type?> ?)
261:33 13 (_ #<intmap 0-11706> #<directory (language cps guile-vm reify-primitives) 282640>)
In language/cps/optimize.scm:
136:2 12 (_ _ #<directory (language cps guile-vm reify-primitives) 282640>)
111:3 11 (optimize-first-order-cps _ _)
In language/cps/switch.scm:
414:6 10 (optimize-branch-chains _)
In language/cps/intmap.scm:
519:6 9 (visit-branch #(#(#(#<intset 0-273> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #f) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #((absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) # ?) ?) ?) ?)
519:6 8 (visit-branch #((absent) (absent) #((absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #<intset 3160-3259> (absent) (absent) (absent) (absent) (absent) (absent) (absent) #f) (absent) (absent) #((absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) # ?) ?) ?)
519:6 7 (visit-branch #((absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #<intset 3689-7729,7913-8003> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #f) _ 3680 _)
In language/cps/switch.scm:
99:36 6 (fold-branch-chains #<intmap 0-8003> _ _ #<procedure optimize-branch-chain (var exit tests cps)> _)
343:8 5 (optimize-branch-chain 3346 7427 (6771 6772 6773 6901 7029 7157 7285) _)
In ice-9/boot-9.scm:
260:13 4 (for-each #<procedure 429618 at language/cps/switch.scm:343:18 (expr)> _)
In language/cps/switch.scm:
340:32 3 (_ (u64-imm-< . 7428))
In language/cps/guile-vm.scm:
89:31 2 (target-symbol-hash _)
41:18 1 (jenkins-lookup3-hashword2 "u64-imm-<")
In ice-9/boot-9.scm:
1676:22 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1676:22: In procedure raise-exception:
Value out of range 0 to< 18446744073709551615: -505802029
make[4]: *** [Makefile:2515: language/cps/guile-vm/reify-primitives.go] Error 1
Investigation on an i386 host, and then a git bisect suggested that this
might be relevant (i.e. the "bad" commit bisect landed on):
commit d579848cb5d65440af5afd9c8968628665554c22
Fix bug lowering logand/immediate to ulogand/immediate
* module/language/cps/specialize-numbers.scm (logand/immediate): Define
a sigbits handler.
(specialize-operations): Require logand/immediate operand to be u64 to
lower to ulogand/immediate. Shouldn't be necessary but even if only u64
bits are used, negative fixnums will have the sign bit set, which trips
up further unboxed uses which error if the operand to `scm->u64` is
negative.
* module/language/cps/type-fold.scm (rem): Emit logand/immediate.
I also found some other issues I have patches for that I'll propose
separately, e.g. test-hashing needs a 32-bit "expected", etc.
Hope this helps, and happy to assist if I can.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Merged 71891 72215.
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 01 Sep 2024 14:30:02 GMT)
Full text and
rfc822 format available.
Changed bug title to 'Compiler error building 3.0.10 on 32-bit platforms' from '3.0.10 may be broken on 32-bit architectures'
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 27 Sep 2024 20:38:02 GMT)
Full text and
rfc822 format available.
Severity set to 'important' from 'normal'
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 27 Sep 2024 21:11:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Fri, 27 Sep 2024 21:11:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Rob Browning <rlb <at> defaultvalue.org>
:
bug acknowledged by developer.
(Fri, 27 Sep 2024 21:11:04 GMT)
Full text and
rfc822 format available.
Message #18 received at 71891-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Rob Browning <rlb <at> defaultvalue.org> skribis:
> In language/cps/switch.scm:
> 99:36 6 (fold-branch-chains #<intmap 0-8003> _ _ #<procedure optimize-branch-chain (var exit tests cps)> _)
> 343:8 5 (optimize-branch-chain 3346 7427 (6771 6772 6773 6901 7029 7157 7285) _)
> In ice-9/boot-9.scm:
> 260:13 4 (for-each #<procedure 429618 at language/cps/switch.scm:343:18 (expr)> _)
> In language/cps/switch.scm:
> 340:32 3 (_ (u64-imm-< . 7428))
> In language/cps/guile-vm.scm:
> 89:31 2 (target-symbol-hash _)
> 41:18 1 (jenkins-lookup3-hashword2 "u64-imm-<")
> In ice-9/boot-9.scm:
> 1676:22 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1676:22: In procedure raise-exception:
> Value out of range 0 to< 18446744073709551615: -505802029
> make[4]: *** [Makefile:2515: language/cps/guile-vm/reify-primitives.go] Error 1
>
> Investigation on an i386 host, and then a git bisect suggested that this
> might be relevant (i.e. the "bad" commit bisect landed on):
>
> commit d579848cb5d65440af5afd9c8968628665554c22
>
> Fix bug lowering logand/immediate to ulogand/immediate
>
> * module/language/cps/specialize-numbers.scm (logand/immediate): Define
> a sigbits handler.
> (specialize-operations): Require logand/immediate operand to be u64 to
> lower to ulogand/immediate. Shouldn't be necessary but even if only u64
> bits are used, negative fixnums will have the sign bit set, which trips
> up further unboxed uses which error if the operand to `scm->u64` is
> negative.
> * module/language/cps/type-fold.scm (rem): Emit logand/immediate.
I believe this was fixed by
<https://git.savannah.gnu.org/cgit/guile.git/commit/?id=aff9ac968840e9c86719fb613bd2ed3c39b9905c>
(see the neat explanation at
<https://wingolog.org/archives/2024/09/26/needed-bits-optimizations-in-guile>).
Confirmed by CI: <https://ci.guix.gnu.org/eval/1667191>.
Thanks,
Ludo’.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Fri, 27 Sep 2024 21:11:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
bug acknowledged by developer.
(Fri, 27 Sep 2024 21:11:05 GMT)
Full text and
rfc822 format available.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Fri, 27 Sep 2024 21:11:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sergey Fedorov <vital.had <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 27 Sep 2024 21:11:05 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 26 Oct 2024 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.