Skip to content

Commit 9da2fec

Browse files
committed
Fix mips64 crash on x86 targets
1 parent 2128e01 commit 9da2fec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

qemu/include/tcg/tcg.h

+7
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,14 @@ typedef struct TCGPool {
276276

277277
#define TCG_POOL_CHUNK_SIZE 32768
278278

279+
#if HOST_LONG_BITS == 32
280+
// Unicorn: On 32 bits targets, our instrumentation uses extra temps and
281+
// thus could exhaust the max temps and cause segment fault.
282+
// Double the limit on 32 bits targets to avoid this.
283+
#define TCG_MAX_TEMPS 1024
284+
#else
279285
#define TCG_MAX_TEMPS 512
286+
#endif
280287
#define TCG_MAX_INSNS 512
281288

282289
/* when the size of the arguments of a called function is smaller than

0 commit comments

Comments
 (0)