SmallRace: Static Race Detection for Dynamic Languages - A Case on Smalltalk
Smalltalk, one of the first object-oriented programming languages, has had a tremendous influence on the evolution of computer technology. Due to the simplicity and productivity provided by the language, Smalltalk is still in active use today by many companies with large legacy codebases and with new code written every day.
A crucial problem in Smalltalk programming is the race condition. Like in any other parallel language, debugging race conditions is inherently challenging, but in Smalltalk, it is even more challenging due to its dynamic nature. Being a purely dynamically-typed language, Smalltalk allows assigning any object to any variable without type restrictions, and allows forking new threads to execute arbitrary anonymous code blocks passed as objects. In Smalltalk, race conditions can be introduced easily, but are difficult to prevent at run time.
We present SmallRace, a novel static race detection framework designed for multithreaded dynamic languages, with a focus on Smalltalk. A key component of SmallRace is SmallIR, a subset of LLVM IR, in which all variables are declared with the same type–a generic pointer i8*. This allows SmallRace to design an effective interprocedural thread-sensitive pointer analysis to infer the concrete types of dynamic variables. SmallRace automatically translates Smalltalk source code into SmallIR, supports most of the modern Smalltalk syntax in Visual Works, and generates actionable race reports with detailed debugging information. Importantly, SmallRace has been used to analyze a production codebase in a large company with over a million lines of code, and it has found tens of complex race conditions in the production code.
Thu 18 MayDisplayed time zone: Hobart change
11:00 - 12:30 | Defect detection and predictionTechnical Track / SEIP - Software Engineering in Practice at Level G - Plenary Room 1 Chair(s): Wei Le Iowa State University | ||
11:00 15mTalk | Detecting Exception Handling Bugs in C++ Programs Technical Track Hao Zhang Institute of Software, Chinese Academy of Sciences, Ji Luo Institute of Software, Chinese Academy of Sciences, Mengze Hu Institute of Software, Chinese Academy of Sciences, Jun Yan Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences, Jian Zhang State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing, China, Zongyan Qiu Peking University | ||
11:15 15mTalk | Learning to Boost Disjunctive Static Bug-Finders Technical Track | ||
11:30 15mTalk | Predicting Bugs by Monitoring Developers During Task Execution Technical Track Gennaro Laudato University of Molise, Simone Scalabrino University of Molise, Nicole Novielli University of Bari, Filippo Lanubile University of Bari, Rocco Oliveto University of Molise | ||
11:45 15mTalk | Detecting Isolation Bugs via Transaction Oracle Construction Technical Track Wensheng Dou Institute of Software Chinese Academy of Sciences, Ziyu Cui Institute of Software Chinese Academy of Sciences, Qianwang Dai Institute of Software Chinese Academy of Sciences, Jiansen Song , Dong Wang Institute of software, Chinese academy of sciences, Yu Gao Institute of Software, Chinese Academy of Sciences, China, Wei Wang , Jun Wei Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences; University of Chinese Academy of Sciences Chongqing School, Lei Chen Inspur Software Group Co., Ltd., Hanmo Wang Inspur Software Group Co., Ltd., Hua Zhong Institute of Software Chinese Academy of Sciences, Tao Huang Institute of Software Chinese Academy of Sciences Pre-print | ||
12:00 15mTalk | SmallRace: Static Race Detection for Dynamic Languages - A Case on Smalltalk Technical Track Siwei Cui Texas A & M University, Yifei Gao Texas A&M University, Rainer Unterguggenberger Lam Research, Wilfried Pichler Lam Research, Sean Livingstone Texas A&M University, Jeff Huang Texas A&M University Pre-print | ||
12:15 15mTalk | CONAN: Diagnosing Batch Failures for Cloud Systems SEIP - Software Engineering in Practice Liqun Li Microsoft Research, Xu Zhang Microsoft Research, Shilin He Microsoft Research, Yu Kang Microsoft Research, Hongyu Zhang The University of Newcastle, Minghua Ma Microsoft Research, Yingnong Dang Microsoft Azure, Zhangwei Xu Microsoft Azure, Saravan Rajmohan Microsoft 365, Qingwei Lin Microsoft Research, Dongmei Zhang Microsoft Research File Attached |