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

Fix a race condition in CtClassType#getClassFile3 #363

Merged
merged 1 commit into from Apr 25, 2021

Commits on Mar 17, 2021

  1. Fix a race condition in CtClassType#getClassFile3

    javassist fails to find a class when concurrently running process
    compresses the class (converts classfile to raw bytes)
    
    the idea of the fix is to make sure to only update rawClassfile and classfile
    under lock in getClassFile3, all other places that modify classfile are
    already synchronized
    
    when reading the object state, we need to read under lock both classfile and
    rawClassFile otherwise we might get an inconsistent state
    michalkurka committed Mar 17, 2021
    Copy the full SHA
    64e1535 View commit details
    Browse the repository at this point in the history