Revision | 644da9b39e477caa80bab69d2847dfcb468f0d33 (tree) |
---|---|
Time | 2015-11-23 21:16:05 |
Author | John Clarke <johnc@kirr...> |
Commiter | Richard Henderson |
tcg: Fix highwater check
A simple typo in the variable to use when comparing vs the highwater mark.
Reports are that qemu can in fact segfault occasionally due to this mistake.
Signed-off-by: John Clarke <johnc@kirriwa.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
@@ -2443,7 +2443,7 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf) | ||
2443 | 2443 | one operation beginning below the high water mark cannot overrun |
2444 | 2444 | the buffer completely. Thus we can test for overflow after |
2445 | 2445 | generating code without having to check during generation. */ |
2446 | - if (unlikely(s->code_gen_ptr > s->code_gen_highwater)) { | |
2446 | + if (unlikely((void *)s->code_ptr > s->code_gen_highwater)) { | |
2447 | 2447 | return -1; |
2448 | 2448 | } |
2449 | 2449 | } |