https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126290

--- Comment #2 from Ammar Faizi <ammarfaizi2 at gnuweeb dot org> ---
Possible Root Cause:
GCC documentation warns that local `register` variables are not guaranteed to
survive function calls, and advises against placing code between the register
assignment and the `asm` block.

However, in this scenario, the developer did not write an intervening function
call.

GCC implicitly inserts the `__tls_get_addr` call to resolve the buffer's
address, and it does so without reloading the register variables before the
`syscall` executes.

Reply via email to