Removing Needless Undefined Behavior for a Safer C++

By Alisdair Meredith

The C standard defers to undefined behavior (UB) in a variety of situations, embracing the freedom for language implementers to achieve portability across the widest array of platforms. With UB, literally anything can happen, which is the problem; the resulting program has no constraints. As the IT industry needs to broadly embrace security concerns across the whole environment, concerns about specifying UB have grown, and modern languages have tried to avoid falling back onto UB entirely. This session will examine the variety of causes of UB expressed in the C standard, broadly classify them, and suggest different ways to eliminate or mitigate many cases of UB. In particular, we will discuss how the forthcoming work on Contracts might be applied within the language itself to optionally support expensive, but well-defined, behavior in more contexts.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.