-
Notifications
You must be signed in to change notification settings - Fork 721
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
Check RomClass is in SCC before storing IProf Data #2510
Conversation
@mpirvu Could you please review. |
* the romClass is within the SCC. | ||
*/ | ||
if (romClass >= cacheStartAddress) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we test that the romClass after the SCC?
@mpirvu Changes made. On a related note, shouldn't this https://github.com/eclipse/openj9/pull/2510/files#diff-31c18c7318f7ce5d1b5699cf26523d07R2999 be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In reply to #2510 (comment) |
The following race is possible: 1. Thread 1 calls TR_IPBCDataCallGraph::canBePersisted on Entry A, which succeeds. However, at least one class in the list is NULL 2. Thread 2 calls TR_IPBCDataCallGraph::setData on Entry A, which also succeeds, setting one of the classes that was previous NULL to something non-NULL. 3. Thread 1 calls TR_IPBCDataCallGraph::createPersistentCopy. Normally if a class in the list is NULL, the value stored is also NULL. However, because Thread 2 updated some previously NULL class, Thread 1 will compute the difference of (ramClass->romClass - startOfSCC) and potentially get a value that's bigger than the SCC. This commit checks for this race before persisting IProfiler data. Signed-off-by: Irwin D'Souza <dsouzai@ca.ibm.com>
Fixed the copyright and added the |
jenkins test all |
The few failures are not related to this PR, so merging. |
The following race is possible:
which succeeds. However, at least one class in the list is NULL
also succeeds, setting one of the classes that was previous NULL
to something non-NULL.
Normally if a class in the list is NULL, the value stored is also
NULL. However, because Thread 2 updated some previously NULL class,
Thread 1 will compute the difference of
(ramClass->romClass - startOfSCC) and potentially get a value
that's bigger than the SCC.
This commit checks for this race before persisting IProfiler data.