staticanalysis / data-race-test

Automatically exported from code.google.com/p/data-race-test
0 stars 0 forks source link

Java: Support ReentrantReadWriteLock #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Egor, I need your help with support for ReentrantReadWriteLock.

1. When intercepting methods from ReentrantReadWriteLock$WriteLock I need to 
have the enclosing object (ReentrantReadWriteLock). Is there a way to get it? 
Or I have to intercept ReentrantReadWriteLock$WriteLock's CTOR to get the 
enclosing object? How do I intercept the CTOR? 

2. When interceping tryLock() (after the call) I need to get the return 
value. How? 

Original issue reported on code.google.com by konstant...@gmail.com on 1 Mar 2010 at 8:20

GoogleCodeExporter commented 9 years ago
Tests: 
testNegative_ReadWriteLock_TryLock
testNegative_ReadWriteLock_ReadAndWriteLocks

Original comment by konstant...@gmail.com on 1 Mar 2010 at 9:38

GoogleCodeExporter commented 9 years ago
return values are always captured when intercepting a non-void call:
http://code.google.com/p/java-thread-sanitizer/source/detail?r=55

Original comment by egor.pasko@gmail.com on 29 Apr 2010 at 3:46