~/talk

Undefined Behavior - Not what you expected

Talkat C++Now 2019 · 2019-05-05..05-10· [security]
links:none on file
slides:none on file

A retry loop decrements an unsigned counter and then immediately dereferences a member pointer that can become null; that null pointer dereference is undefined behavior so Clang's optimizer removes the exit branch, turning the loop into an endless sequence of "connection failed" logs. The bug reproduces only with Clang (not GCC) and is visible on Godbolt; the surprising claim is that a UB after the loop lets the compiler delete the loop-exit check.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.