摘要: We present GOLDILOCKS, a Java runtime that monitors program executions and throws DataRaceException when data race is about to occur. This prevents racy accesses from taking place, allows conditions be handled before they cause errors may difficult diagnose later. The valuable debugging tool, and, if supported with reasonable computational overhead, can an important safety feature for deployed programs. Experiments by us others on race-aware runtimes indicate thatthe viable mechanism enforce the of multithreaded An benefit in our are guaranteed free thus sequentially consistent as per Memory Model. strong guarantee provides easy-to-use, clean semantics programmers, helps rule out many concurrency-related possibilities errors. To support DataRaceException, incorporates novel Goldilocks algorithm precise dynamic detection. general, intuitive, handle different synchronization patterns uniformly.