curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1793] [Mantis 1829] "Branch out of range" error #291

Open curiousdannii-testing opened 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : hugolabrande

Description :

Tested on the latest 6.33. (This may be related to http://inform-fiction.org/patches/C63003.html ?)

On a source I was working on, I got the following error right after including a new extension:

"", line 1: Fatal error: Branch out of range: divide the routine up?

The error remains even after removing the body of a lot of the routines I wrote; however it disappears if I remove even just one of the routines, or one of the includes. The error also disappears if I don't include the -X flag.

I can also add a "Replace ScoreSub;" and " [ ScoreSub; ];" without the error disappearing.

The code requires numerous includes and the error seems to be quite fragile, so I put it on my website: http://www.hlabrande.fr/branchoutofrange-mantis.zip (I don't think I can upload it here?)

Steps to reproduce :

Download the code from my website and compile using:
    inform -X +include_path=,bibliotheques +Language_name=French comp2015

Additional information :

imported from: [Mantis 1829] "Branch out of range" error
  • status: Reported
  • resolution: Open
  • resolved: 2022-04-07T05:01:02+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
Confirmed. (Also had to add the setting $MAX_VERBS=250.)

My guess is that this is the generated Infix code getting too large.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
Yeah, it's conking out in compile_symbol_table_routine() when generating the Symb__Tab function. I don't really grok the structure of this thing, but I think it has an upper limit on the number of arrays, functions, and (maybe) constants it can handle.

The only workaround is to drop -X.