FWIW, it fails with a heap overflow on FreeBSD-91 (x86-64) as well. gsi was built from yesterday's git pull) but its behavior is peculiar. It fails for pi 20K-something but succeeds for (pi 200000) so I wrote a little test program to see for what N in (pi N) it fails in the hope this reveals some pattern.
cat > tst.sh <<'EOF' #!/bin/sh start=$1 end=$2 incr=$3 if [ .$start = "." ]; then start=20000; fi if [ .$end = "." ]; then end=$(($start + 10000)); fi if [ .$incr = "." ]; then incr=1000; fi
i=$start while [ $i -le $end ]; do echo "$i" x=$(echo "(define x (pi " $i "))") gsi/gsi chud.scm -e "$x" i=$(($i + $incr)) done EOF chmod +x tst.sh
# Now I ran it for 1..10000 digits of pi. $ tst.sh 1 10000 1 >& foo $ grep -B 1 FATAL foo 5032 *** FATAL ERROR -- Heap overflow -- 5047 *** FATAL ERROR -- Heap overflow -- 5061 *** FATAL ERROR -- Heap overflow -- 5126 *** FATAL ERROR -- Heap overflow 5127 *** FATAL ERROR -- Heap overflow ...
Next I turned tracing on for ch-split. Unfortunately gsi sends its own debugging output to the console while the FATAL ERROR message goes to stderr and the two are not synchronized so we don't know see exactly where it faulted.
Anyway, this pattern doesn't reveal anything interesting at the moment....
We know it works for v6.6.1 so may be it is worth doing a binary search over git commits?