You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packing 2 shadow bits together results in a race if two threads access
adjacent bytes within the same word. this would only be a problem if the
bytes are unintialized and the two threads both write to them: one could
end up remaining uninitialized, leading to false positives
ways to eliminate the race:
a) lock around multi-op for sub-word access in multi-threaded app ("lock
bts" and "lock btr": pretty expensive)
b) byte-to-byte shadowing
c) thread serialization
d) hybrid mapping? but would need sub-word info for majority of memory?
I plan to implement a series of choices for multi-threaded:
byte-to-byte: no races but 4x as much memory; suitable for 64-bit and
many 32-bit apps.
byte-to-byte should give some perf improvements too.
dynamic byte-to-byte, switch to 2-bit synch if run out of mem?
byte-to-2-bits with synch (probably thread serialization):
no races but slow; suitable for those 32-bit apps that care about both
races and memory
byte-to-2-bits with no synch: my current impl, suitable for apps that
want to save memory but aren't worried about potential false negatives
from concurrent intra-word initial writes
for byte-to-byte register shadows need more TLS: should do DR TLS stuff
first so no resource limits on Windows
From [email protected] on January 14, 2011 16:38:34
packing 2 shadow bits together results in a race if two threads access
adjacent bytes within the same word. this would only be a problem if the
bytes are unintialized and the two threads both write to them: one could
end up remaining uninitialized, leading to false positives
ways to eliminate the race:
a) lock around multi-op for sub-word access in multi-threaded app ("lock
bts" and "lock btr": pretty expensive)
b) byte-to-byte shadowing
c) thread serialization
d) hybrid mapping? but would need sub-word info for majority of memory?
I plan to implement a series of choices for multi-threaded:
many 32-bit apps.
byte-to-byte should give some perf improvements too.
dynamic byte-to-byte, switch to 2-bit synch if run out of mem?
no races but slow; suitable for those 32-bit apps that care about both
races and memory
want to save memory but aren't worried about potential false negatives
from concurrent intra-word initial writes
for byte-to-byte register shadows need more TLS: should do DR TLS stuff
first so no resource limits on Windows
Original issue: http://code.google.com/p/drmemory/issues/detail?id=271
The text was updated successfully, but these errors were encountered: