-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
FASTJSON2 crushes JVM when polymorphism is used #4533
Comments
Just remove the |
Thanks. It works, but I think it could be good to add some exception to know what is going on. |
Adding exception information seems to be feasible, Maybe you need to report it in another repository instead of here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
FASTJSON2 has problem to parse JSON to specific object by
JSON.parseObject()
mehod when polymorphism is used. Object type class inherits from some abstract class. To describe classes@JSONType
annotation was used. The final result is crushed JVM.Practical example
Used OS:
Ubuntu 24.04.1 LTS x64
Used JVM:
Note: the same problem occurs on Java 17 so it looks like the problem is common.
Used FASTJSON2:
Source code that crushes JVM (
Program.java
):Console output:
JVM logs (
hs_err_pid64235.log
):The text was updated successfully, but these errors were encountered: