diff options
Diffstat (limited to 'reproducers/issue-508.c')
| -rw-r--r-- | reproducers/issue-508.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/reproducers/issue-508.c b/reproducers/issue-508.c index c8fd251..5ec18d1 100644 --- a/reproducers/issue-508.c +++ b/reproducers/issue-508.c @@ -1,18 +1,8 @@ -#include <stdio.h> -#include <stdlib.h> -#include <sys/random.h> - int main() { int mem = 0x12345678; - int buf = 0; - getrandom(&buf, sizeof(buf), 0); register long rax asm("rax") = 0x1234567812345678; - register int edi asm("edi") = buf; + register int edi asm("edi") = 0x2345678; asm("cmpxchg %[edi],%[mem]" : [ mem ] "+m"(mem), [ rax ] "+r"(rax) : [ edi ] "r"(edi)); - long rax2 = rax; - printf("rax2 = %lx\n", rax2); - printf("rand= %d\n", buf); } - |