-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
| Bugzilla Link | 9539 |
| Resolution | FIXED |
| Resolved on | Oct 09, 2013 15:53 |
| Version | unspecified |
| OS | Linux |
| CC | @atrick |
Extended Description
Testcase:
#include <stdio.h>
typedef __int128_t x;
__attribute((noinline)) int a(x i, x j, int *p, int z) {
int k = i>j;
int l = (k?11:111)/z;
asm volatile ("" :::"memory", "rcx", "rax", "rdx", "rbx", "rsi", "rdi", "rbp", "r9", "r10", "r11", "r12", "r13", "r14", "r15");
*p = l;
if (k) return 201/z;
return 0;
}
int main() {
int x;
printf("%d\n", a(1, 0, &x, 1));
}
The compiled program built with clang crashes on x86-64 Linux. The issue is that the code generated to spill EFLAGS corrupts values spilled into the red zone.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla