summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-03-23 03:16:12 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-03-23 03:16:47 +0300
commit094ca53744a0b8970f0b30be35cdd0477b7cdfea (patch)
tree5d856d9ed432ef476577fe5699a45ed078818f43 /tools
parent0b814a895f23ae272551c38c2f3e1109b42e52c4 (diff)
downloadbdwgc-094ca53744a0b8970f0b30be35cdd0477b7cdfea.tar.gz
Fix tools/setjmp_t hang (OS X)
* tools/setjmp_t.c (main): Declare "y" static variable as volatile (to prevent reordering/optimization of y++).
Diffstat (limited to 'tools')
-rw-r--r--tools/setjmp_t.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/setjmp_t.c b/tools/setjmp_t.c
index 987599ed..b3bb86da 100644
--- a/tools/setjmp_t.c
+++ b/tools/setjmp_t.c
@@ -82,7 +82,7 @@ int main(void)
unsigned ps = GETPAGESIZE();
jmp_buf b;
register int x = (int)strlen("a"); /* 1, slightly disguised */
- static int y = 0;
+ static volatile int y = 0;
sp = (word)(&sp);
printf("This appears to be a %s running %s\n", MACH_TYPE, OS_TYPE);