Skip to content

Native functions returning arrays and reparsing crash #466

Open
@IS4Code

Description

@IS4Code

Function stubs (native functions) that explicitly return an array don't seem to be handled well by the compiler. First, there are two asserts that fail when such a function is declared:

sc2.c:3265
sc3.c:2007

In case of such a function, a global array is created with the same name as the function. The first assert fails because curfunc is not defined when the function has no body (in funcstub), and the second one fails because the additional variable is defined as iARRAY, while it should be iREFARRAY. Both these asserts fail when such a function is defined or called.

In addition to this, when a reparse is caused, the variable is (apparently) incorrectly deleted, resulting in a crash in delete_symbols. I haven't been able to find the issue, but perhaps this code is incorrect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions