================
Comment at: lib/Lex/Pragma.cpp:928-932
@@ -927,6 +927,7 @@
#endif
static void DebugOverflowStack() {
+ void* StackUser = &StackUser;
void (*volatile Self)() = DebugOverflowStack;
Self();
}
#ifdef _MSC_VER
----------------
rsmith wrote:
> A smart compiler could still optimize out the stack usage here. How about
> using something that keeps all the stack memory live, such as:
>
> volatile void *Head;
> static void DebugOverflowStack(void *Curr = 0) {
> Head = Curr;
> DebugOverflowStack(&Curr);
> }
>
> Hopefully MSVC doesn't optimize out stores to volatile globals...
Sorry, should be
void *volatile Head;
http://reviews.llvm.org/D5109
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits