#440 closed defect (invalid)
'Error: stack overflow' error in unexpected situation
| Reported by: | Alan Post | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 4.9.0 |
| Component: | core libraries | Version: | 4.6.x |
| Keywords: | Cc: | alanpost@… | |
| Estimated difficulty: |
Description
This ticket is a follow-up to the email thread I posted about this issue.
I'm running chicken 2bb09388cff32b7ecb49f39df0692e2d4db7a0bf (silly link case problems, tiring) from the experimental branch. I'm on OpenBSD 4.8 running in a VMWare virtual machine.
This bug refers to the genturfa'i egg.
For this bug, please check out r21827 from the egg repository, apply the patches attached to this e-mail, and build the egg:
svn co -r21827 https://code.call-cc.org/svn/chicken-eggs/release/4/genturfahi/trunk cd trunk patch -p1 < patch-conf # enable full debugging patch -p1 < patch-memoize # the do-nothing memoizer chicken-install -s
Run the genturfahi command-line program after installing the egg:
$ genturfahi
Error: stack overflow
Call history:
nunjavni.scm:176: nunjavni-*
nunjavni.scm:140: venunjmina-rodanunvalsi
morji.scm:47: hash-table-exists?
bootstrap.scm:369: genturfahi#morji-nunjavni-valsi
morji.scm:47: hash-table-exists?
morji.scm:48: hash-table-set!
bootstrap.scm:366: genturfahi#morji-nunjavni-je
nunjavni.scm:245: venunjmina-rodanunvalsi
nunjavni.scm:247: filter
morji.scm:47: hash-table-exists? <--
This error is happening while genturfahi is initializing, the most outward relevant line being bootstrap.scm:366.
If you comment out morji.scm:47 and morji.scm:48, run chicken-install -s, the program will run without producing any output (which is expected.)
I would expect to be able to leave morji.scm:47 and morji.scm:48 uncommented in the code and run genturfahi without generating a stack overflow error.
This problem *also* exists when running the code from csi, without compiling it:
# This command may give an error if csi is an alias that includes
# command-line arguments, as in: alias csi='csi -quiet'. Run csi
# without command-line arguments.
#
$ csi chicken-csi.scm
Error: stack overflow
Call history:
<eval> [morji-nunjavni] (not (hash-table-exists? morji sumti))
<eval> [morji-nunjavni] (hash-table-exists? morji sumti)
<eval> [morji-nunjavni] (hash-table-set! morji sumti javni)
<eval> [morji-nunjavni] (apply nunjavni sumti)
<eval> [nunjavni-+] (##sys#get-keyword (quote cmene:) tmp268)
<eval> [nunjavni-+] (nunjavni-* javni cmene: cmene)
<eval> [nunjavni-*] (##sys#get-keyword (quote cmene:) tmp241)
<eval> [nunjavni-*] (venunjmina-rodanunvalsi cmene)
<eval> [morji-nunjavni] (not (hash-table-exists? morji sumti))
<eval> [morji-nunjavni] (hash-table-exists? morji sumti) <--
This error also goes away if you comment out morji.scm:47 and morji.scm:48.
Attachments (2)
Change History (6)
Changed 15 years ago by
| Attachment: | patch-conf added |
|---|
comment:1 Changed 15 years ago by
| Cc: | alanpost@… added |
|---|
comment:2 Changed 15 years ago by
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
This was caused by circular data in an implicit equal? comparison in a hash-table test. It turned out that keys to the hash-table operation included closures, which can easily contain circular data and which is strictly speaking not legal to do. So this is effectively a bug in the chicken runtime library implemtation for equal?.
I will open a new ticket for changing equal? and close this one as "invalid", since the reason is different from what we initially suspected and because a new ticket will cover this problem.

enable full debug output.