The FreeBasic Compiler unfortunately crashes when trying to compile the following (old) piece of code:
http://users.freebasic-portal.de/stw/fi ... Master.zip
The archive includes a "compile.bat" containing the used command line arguments. The code requires compilation in the "deprected" language dialect.
I also tried compiling using a debug-build of fbc.exe (built with -g -exx) but got no error messages before the crash.
//edit: stacktrace looks like a stack overflow in astTypeIniUsesLocals (ast-node-typeini.bas)
fbc crash in lang deprecated
Re: fbc crash in lang deprecated
it looks like it's the same problem discussed here viewtopic.php?f=2&t=26576
see https://sourceforge.net/p/fbc/bugs/798/
see https://sourceforge.net/p/fbc/bugs/798/
Re: fbc crash in lang deprecated
Thank you, that sounds reasonable as the code uses such large initializers.
Interestingly the code compiled using very old versions of FreeBasic so the AST storage or traversal implementation of such initializers must have been able to deal with such situtations once ago.
btw, @devs (like counting_pine, dkl):
I see quite a lot of open issues on SourceForge, maybe it could help to label a few easier ones as "good first issue" (as GitHub recommends) to attract new contributors?
Interestingly the code compiled using very old versions of FreeBasic so the AST storage or traversal implementation of such initializers must have been able to deal with such situtations once ago.
btw, @devs (like counting_pine, dkl):
I see quite a lot of open issues on SourceForge, maybe it could help to label a few easier ones as "good first issue" (as GitHub recommends) to attract new contributors?
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: fbc crash in lang deprecated
Obviously the compiler can't handle lines (concatenated with underscores) longer than abt. 1.000.000 characters and terminates compilation without an error message.
The CopperMaster package contains several of those lines.
The CopperMaster package contains several of those lines.
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
Re: fbc crash in lang deprecated
Does SourceForge have a "good first issue" tag?
I had a look at the first couple of pages on https://sourceforge.net/p/fbc/bugs, there wasn't much that particularly jumped out at me.
This one has a fairly simple fix, I think:
https://sourceforge.net/p/fbc/bugs/826/
This one also would give someone a good introduction to FB code. The fix should be easy to find and make, and whoever does it would get a very basic overview of the structure of FB's code, and also ensure they can modify, make, and test the compiler.
https://sourceforge.net/p/fbc/bugs/820/
I had a look at the first couple of pages on https://sourceforge.net/p/fbc/bugs, there wasn't much that particularly jumped out at me.
This one has a fairly simple fix, I think:
https://sourceforge.net/p/fbc/bugs/826/
This one also would give someone a good introduction to FB code. The fix should be easy to find and make, and whoever does it would get a very basic overview of the structure of FB's code, and also ensure they can modify, make, and test the compiler.
https://sourceforge.net/p/fbc/bugs/820/
Re: fbc crash in lang deprecated
I added an example to check the fix.counting_pine wrote:This one also would give someone a good introduction to FB code. The fix should be easy to find and make, and whoever does it would get a very basic overview of the structure of FB's code, and also ensure they can modify, make, and test the compiler.
https://sourceforge.net/p/fbc/bugs/820/
Re: fbc crash in lang deprecated
Looks like SourceForge bugs can have "labels", which could be used for this. Then it would also make sense to enable the "labels" column in the list view. Also new fields can be added (currently we have the "Component" one).