| ▲ | tstenner 4 days ago | ||||||||||||||||
Was it the one with the elided null check? | |||||||||||||||||
| ▲ | aka-rider 3 days ago | parent [-] | ||||||||||||||||
I don't remember the details, roughly it was unexpected invocation of move semantic, causing use after free in a loop. My all-time favourite example is (again, my memory, I may be a bit wrong):
at some point limit could potentially become greater than INT_MAX, the compiler decided that i<limit could never be true because that would cause signed int overflow which is UB, so it "optimized" the loop into
signed unsigned mismatch makes me shiver | |||||||||||||||||
| |||||||||||||||||