Summary

binary-search: test failure: (=) bad argument type - not a number: #f

Metadata

Description

See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2018/08/21/salmonella-report/test/binary-search.html

Changes and comments

[2021-08-29 21:02:05 UTC] wasamasa wrote:

More recent test failure: http://salmonella-linux-x86.call-cc.org/master/clang/linux/x86/2021/08/27/salmonella-report/test/binary-search.html

[2023-11-06 23:41:33 UTC] felix changed milestone from someday to 5.4

[2023-12-21 09:43:31 UTC] sjamaan changed status from new to closed

[2023-12-21 09:43:31 UTC] sjamaan set resolution to fixed

[2023-12-21 09:43:31 UTC] sjamaan wrote:

Seems to have been fixed: http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2023/12/20/salmonella-report/test/binary-search.html

[2023-12-21 09:44:49 UTC] sjamaan changed status from closed to reopened

[2023-12-21 09:44:49 UTC] sjamaan removed resolution fixed

[2023-12-21 09:44:49 UTC] sjamaan wrote:

My bad, it's x86-specific: http://salmonella-linux-x86.call-cc.org/master/clang/linux/x86/2023/12/20/salmonella-report/test/binary-search.html

[2023-12-21 11:40:08 UTC] sjamaan wrote:

I think the problem is that (square x) returns bignums on 32-bit platforms, while binary-search assumes fixnums everywhere.

The code checks that the sequence is within fixnum range, but it doesn't do so for the return value of proc in the loop (but still calls fixnum ops on it!)

[2024-01-11 19:30:06 UTC] mario changed status from reopened to closed

[2024-01-11 19:30:06 UTC] mario set resolution to fixed

[2024-01-11 19:30:06 UTC] mario wrote:

The issue been fixed with the 0.2 release (http://bugs.call-cc.org/changeset/43071/project). After that, tests succeed: http://salmonella-linux-x86.call-cc.org/master/clang/linux/x86/2023/12/27/salmonella-report/test/binary-search.html