Manuel Rigger, Roland Schatz, Matthias Grimmer, Hanspeter Mössenböck,
"Lenient Execution of C on a Java Virtual Machine: or: How I Learned to Stop Worrying and Run the Code"
: Proceeding ManLang 2017 Proceedings of the 14th International Conference on Managed Languages and Runtimes, ACM, New York, Seite(n) 35-47, 9-2017, ISBN: 978-1-4503-5340-3
Original Titel:
Lenient Execution of C on a Java Virtual Machine: or: How I Learned to Stop Worrying and Run the Code
Sprache des Titels:
Englisch
Original Buchtitel:
Proceeding ManLang 2017 Proceedings of the 14th International Conference on Managed Languages and Runtimes
Original Kurzfassung:
Most C programs do not conform strictly to the C standard, and often show undefined behaviors, for instance, in the case of signed integer overflow. When compiled by non-optimizing compilers, such programs often behave as the programmer intended. However, optimizing compilers may exploit undefined semantics to achieve more aggressive optimizations, possibly breaking the code in the process. Analysis tools can help to find and fix such issues. Alternatively, a C dialect could be defined in which clear semantics are specified for frequently occurring program patterns with otherwise undefined behaviors. In this paper, we present Lenient C, a C dialect that specifies semantics for behaviors left open for interpretation in the standard. Specifying additional semantics enables programmers to make safe use of otherwise undefined patterns. We demonstrate how we implemented the dialect in Safe Sulong, a C interpreter with a dynamic compiler that runs on the JVM.