logoalt Hacker News

IAmLiterallyABtoday at 3:23 AM1 replyview on HN

I wonder if an adversarial user could bypass the checks and achieve memory corruption / code execution. Maybe not a practical attack in most situations but a fun exercise.

> This includes things like asm volatile("" : : : "memory"), which is an old-school way of saying atomic_signal_fence(memory_order_seq_cst).

Not quite. AIUI, the first is just a barrier for the compiler, while the second is also a CPU memory barrier. Godbolt seems to confirm that.

https://godbolt.org/z/a844zKej8


Replies

pizlonatortoday at 3:25 AM

Your godbolt code used atomic_thread_fence

The quote uses atomic_signal_fence.

If you find a way to bypass my checks, file a bug. I tried very hard to break it. My agent loops tried even harder

show 2 replies