Skip to content
New issue

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

The parsing can get into endless loop, and abort with StackOverflowException #105

Closed
cyborgyn opened this issue Oct 13, 2021 · 3 comments
Closed

Comments

@cyborgyn
Copy link

If we try to transpile a struct, where one of the static fields are themselves, the transpilation fails with StackOverflowException.
Example:

    public struct MyStruct
    {
        private int value;

        public static MyStruct Default = new MyStruct(1000);

        public MyStruct(int value) { this.value = value; }
    }
@kekyo
Copy link
Owner

kekyo commented Oct 14, 2021

@cyborgyn The static field initializer (translated type initializer) implicitly depends correct initializing sequence graph.
I don't check a requirements on ECMA-335 and don't have much insight now...

#97 and #98 related, first related issue is #4

If we don't any resolve correcting, may cause the binary touch uninitialized data...?

@kekyo
Copy link
Owner

kekyo commented Oct 14, 2021

Bit related? #85

@kekyo
Copy link
Owner

kekyo commented May 28, 2022

@cyborgyn Sorry for the very delay. I understood #100 work and imported it with cherry-pick. 2cbb6f1

@kekyo kekyo closed this as completed May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants