| ▲ | NobodyNada 2 hours ago | |||||||
If you wrote a Q_free function and called it after `free(l);` to actually demonstrate the UAF, that would be pretty close to the semantics of the Rust example. | ||||||||
| ▲ | 1718627440 an hour ago | parent [-] | |||||||
I have added that now. I originally didn't do this, because I didn't feel the need to invoke UB without necessity. Also I wanted to demonstrate, that the error can (and is) caught in C, without actually committing the double-free (so that the program behaviour is still well-defined, but the abstraction is already violated). | ||||||||
| ||||||||