Summary
'Error: stack overflow' error in unexpected situation
Metadata
- Id: c5631a76516842ff80a72926d0065a8715097cd4
- Trac id: 440
- Type: defect
- Reporter: alanpost
- Owner:
- Cc: alanpost@sunflowerriver.org
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: invalid
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2010-12-06 00:12:34 UTC
- Keywords:
Attachments
- c5631a76516842ff80a72926d0065a8715097cd4/attachments/patch-memoize
- c5631a76516842ff80a72926d0065a8715097cd4/attachments/patch-conf
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.
Changes and comments
[2010-12-06 00:12:58 UTC] alanpost attached patch-conf (description=enable full debug output.)
[2010-12-06 00:13:21 UTC] alanpost attached patch-memoize (description=patch to make the memoizer a no-op.)
[2010-12-06 00:15:45 UTC] alanpost set cc to alanpost@sunflowerriver.org
[2010-12-07 11:11:28 UTC] felix changed status from new to closed
[2010-12-07 11:11:28 UTC] felix set resolution to invalid
[2010-12-07 11:11:28 UTC] felix wrote:
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.
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted