Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a fun example with clang where you can have two pointers where:

    x == y
But:

    *x != *y
It involves invoking undefined behavior by using a pointer after it's been freed and arranging for a new pointer at the exact same location. Clang cached the contents of the old pointer and uses it in the comparison.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: