tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37458] Datarace on org.apache.catalina.loader.WebappClassLoader
Date Fri, 02 Jan 2009 02:44:07 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=37458





--- Comment #9 from Konstantin Kolinko <knst.kolinko@gmail.com>  2009-01-01 18:44:06
PST ---
Created an attachment (id=23066)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23066)
patch for WebappClassLoader class of tc6.0.x

I think the issue is caused by missing (entry.loadedClass == null) inside the
synchronized block. (Remember the double-checked locking pattern?)

I also wonder if there is a cause for (entry.loadedClass == null) check later
in the synchronized block (line 1845, i.e. before calling defineClass()) other
than this very bug.

Thus the patch. It is against tc6.0.x

I do not remember whether pointer assignments are atomic in current Java, and
thus whether it is safe to test for (entry.loadedClass) elsewhere in the code.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message