fbc crash in lang deprecated

General FreeBASIC programming questions.
St_W
Posts: 1470
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

fbc crash in lang deprecated

Postby St_W » Apr 30, 2018 21:06

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)
Image
srvaldez
Posts: 2063
Joined: Sep 25, 2005 21:54

Re: fbc crash in lang deprecated

Postby srvaldez » Apr 30, 2018 22:24

it looks like it's the same problem discussed here viewtopic.php?f=2&t=26576
see https://sourceforge.net/p/fbc/bugs/798/
St_W
Posts: 1470
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: fbc crash in lang deprecated

Postby St_W » May 01, 2018 15:52

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?
grindstone
Posts: 644
Joined: May 05, 2015 5:35
Location: Germany

Re: fbc crash in lang deprecated

Postby grindstone » May 02, 2018 7:06

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.
counting_pine
Site Admin
Posts: 6170
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: fbc crash in lang deprecated

Postby counting_pine » May 02, 2018 12:50

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/
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: fbc crash in lang deprecated

Postby fxm » May 02, 2018 15:09

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/

I added an example to check the fix.
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: fbc crash in lang deprecated

Postby dkl » May 02, 2018 15:48

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).

Return to “General”

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 42 guests