We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This causes a segmentation fault
class A{ constructor(){ this.iter=[]._iter(); } } (new A())
The output code is the following,
ScriptFunction: '@MainFunction' Stack code: 2 Stack local vars: 0 Total stack required: 2 Scopes: 1 NUM |RS|AS| BYTE CODE -----+--+--+-------------------------------------------------- [0000| 1|01] NEW_OBJECT_BY_TYPE A [0001| 1|02] LOAD_CONSTRUCTOR_FUNCT constructor [0002|-1|00] CALL_CONSTRUCTOR arg:0 ret:0 [RST] ______________________________________________________________ ScriptFunction: 'A::constructor' Stack code: 3 Stack local vars: 0 Total stack required: 3 Scopes: 0 NUM |RS|AS| BYTE CODE -----+--+--+-------------------------------------------------- [0000| 1|01] NEW_ARRAY [0001| 1|02] LOAD_OBJ@ITEM _iter [CALL] [0002| 0|02] MEMBER_CALL arg:0 ret:1 [0003| 1|03] PUSH_STK_THIS@VAR this.iter [SLOT] [0004|-1|00] STORE n:1 [RST] Segmentation fault (core dumped)
As a solution could be do not call _iter just after creation (i.e NEW_ARRAY or NEW_OBJECT instruction)
The text was updated successfully, but these errors were encountered:
jespa007
No branches or pull requests
This causes a segmentation fault
The output code is the following,
As a solution could be do not call _iter just after creation (i.e NEW_ARRAY or NEW_OBJECT instruction)
The text was updated successfully, but these errors were encountered: