mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-10 18:55:27 +00:00
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. Backports commit 644da9b39e477caa80bab69d2847dfcb468f0d33 from qemu
This commit is contained in:
parent
3ba8959dfd
commit
5c57445f08
|
@ -2488,7 +2488,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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue