ColorSafe: architectural support for debugging and dynamically avoiding multi-variable atomicity violations