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

[upstream]art-test 174-escaping-instance-of-bad-class run fail #76

Open
sendaoYan opened this issue Jun 28, 2023 · 1 comment
Open

[upstream]art-test 174-escaping-instance-of-bad-class run fail #76

sendaoYan opened this issue Jun 28, 2023 · 1 comment

Comments

@sendaoYan
Copy link
Collaborator

17.0.6 run pass:

image

17.0.8 run fail:

image

Main.java.txt

@sendaoYan
Copy link
Collaborator Author

裁剪用例:

class Main {
    public static void main(String a[]) {
        try {
            new B(1);
        } catch (Error c) {
        }
        try {
            bad.foo();
        } catch (NoClassDefFoundError error) {
            if (error.getCause() == null)
                System.out.println("Caught NoClassDefFoundError.");
            else
                error.printStackTrace();
        }
    }

    static B bad;
}

class B {
    static {
        Main.bad = new B(3);
        if (true)
            throw new Error();
    }

    void foo() {
        System.out.println(e);
    }

    B(int f) {
    }

    static int e;
}

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

1 participant