https://llvm.org/bugs/show_bug.cgi?id=23094
Bug ID: 23094
Summary: WinEHPrepare needs to watch out for va_start in catch
handlers
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
consider:
void g();
int f(int a, ...) {
try {
g();
} catch (int) {
__builtin_va_list ap;
__builtin_va_start(ap, a);
int x = __builtin_va_arg(ap, int);
__builtin_va_end(ap);
return x;
}
return -1;
}
the outlined catch handler will contain:
call void @llvm.va_start(i8* %ap1)
this will not end well for our catch handler seeing as how the arguments really
belong to the parent function.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs