I put a “find the three memory-safety bugs in this C program” question on my exam, and of course there are (at least) four bugs 🤦
@adrian Good thing you hedged with (at least). :)
@adrian Did you include some landmines involving lifetime-end pointer zap? Although it looks like it's one of the things that might get "fixed" in the spec since it makes too much existing useful code into UB.
@pervognsen I did not, but there are more exams coming in this class… 🤪
@adrian should've just left out the word "the"

@adrian

Change it to "find three" so that it's open ended

@adrian I'm pretty sure that there's never, ever been a "find the C bug" where this didn't happen
@regehr who knew the “every nontrivial C program has UB” theorem had the corollary “every intentionally buggy C program has even more bugs than that”