commit | a1ff475b07dd7c8a2dfa0e83bc2a25ef159b6152 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Thu Oct 23 16:50:51 2014 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Thu Oct 23 16:50:51 2014 -0700 |
tree | 9ebb0e3dae4c6942627d7e5a2b1fcc7071a156a4 | |
parent | 5bea7edddd1bca0f94b08f3fb7aefab1c3021e17 [diff] |
Add volatile to avoid clang optimization. BUG: 18108178 Change-Id: Ie5b8b1808fcf6d1eacc14a7c6ac0c8d49641fec2
diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c index d315ee5..d0c3912 100644 --- a/debuggerd/crasher.c +++ b/debuggerd/crasher.c
@@ -59,7 +59,7 @@ for(;;) { usleep(250*1000); write(2, &c, 1); - if(c == 'C') *((unsigned*) 0) = 42; + if(c == 'C') *((volatile unsigned*) 0) = 42; } return NULL; }