projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b814a8
)
Fix tools/setjmp_t hang (OS X)
author
Ivan Maidanski
<ivmai@mail.ru>
Thu, 23 Mar 2017 00:16:12 +0000
(
03:16
+0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Thu, 23 Mar 2017 00:16:47 +0000
(
03:16
+0300)
* tools/setjmp_t.c (main): Declare "y" static variable as volatile (to
prevent reordering/optimization of y++).
tools/setjmp_t.c
patch
|
blob
|
history
diff --git
a/tools/setjmp_t.c
b/tools/setjmp_t.c
index
987599e
..
b3bb86d
100644
(file)
--- 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);