提交 644da9b3 编写于 作者: J John Clarke 提交者: 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: NJohn Clarke <johnc@kirriwa.net>
Signed-off-by: NRichard Henderson <rth@twiddle.net>
上级 541abd10
......@@ -2443,7 +2443,7 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
one operation beginning below the high water mark cannot overrun
the buffer completely. Thus we can test for overflow after
generating code without having to check during generation. */
if (unlikely(s->code_gen_ptr > s->code_gen_highwater)) {
if (unlikely((void *)s->code_ptr > s->code_gen_highwater)) {
return -1;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册