mighty-gerbils / gerbil

Gerbil Scheme
https://cons.io
GNU Lesser General Public License v2.1
1.15k stars 111 forks source link

Fix interpreter segfaults #1112

Open fare opened 8 months ago

fare commented 8 months ago

Interpreter tends to segfault when too many modules are imported (due to memory corruption? stack overflow?)

Example file attached (gzip'ed to pass the GitHub filter): i.scm.gz

Uncomment the top import and it works (loops forever solving the day 14 problem). Comment it and segfault happens early on (usually during the first attempt). Try to import fewer / smaller modules (including transitive dependencies) and the segfaults will happen less often (more iterations needed to trigger it) but eventually may still.