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 All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.