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

Conversation

michalkurka
Copy link
Contributor

@michalkurka michalkurka commented Mar 17, 2021

javassist fails to find a (ct)class when concurrently running process
compresses the (ct)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

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
@chibash chibash merged commit b4cb5cb into jboss-javassist:master Apr 25, 2021
chibash added a commit that referenced this pull request Apr 25, 2021
odl-github pushed a commit to opendaylight/odlparent that referenced this pull request Jan 7, 2022
odl-github pushed a commit to opendaylight/odlparent that referenced this pull request Jan 7, 2022
jboss-javassist/javassist#305
jboss-javassist/javassist#328
jboss-javassist/javassist#339
jboss-javassist/javassist#350
jboss-javassist/javassist#357
jboss-javassist/javassist#363

Change-Id: I29963013cf637731fe1064425b9d2e80d63bd9d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0df0ba3)
odl-github pushed a commit to opendaylight/odlparent that referenced this pull request Jan 7, 2022
jboss-javassist/javassist#305
jboss-javassist/javassist#328
jboss-javassist/javassist#339
jboss-javassist/javassist#350
jboss-javassist/javassist#357
jboss-javassist/javassist#363

Change-Id: I29963013cf637731fe1064425b9d2e80d63bd9d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0df0ba3)
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

Successfully merging this pull request may close these issues.

None yet

2 participants