Skip to contentSkip to conversation

Fragile MAX_OP_PER_INSTR

Qemu-devel Jan Kiszka 2 participants 2 messages Apr 22, 2008 – May 6, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi,

we ran into a weird SEGFAULT of QEMU which turned out to be a corruption of tcg_ctx due to writing beyond gen_opc_buf. The reason for this was a too small MAX_OP_PER_INSTR, given a particular toolchain (here the one of SLES 10 for x86-32). So far it runs fine with

#define MAX_OP_PER_INSTR 64

Does anyone have an idea how to resolve the related comment in exec-all.h?

/* XXX: make safe guess about sizes */

Or should we just increase the safety margin?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
#1 lore raw
Quoted 7 lines · Jan Kiszka

Hi,

we ran into a weird SEGFAULT of QEMU which turned out to be a corruption of tcg_ctx due to writing beyond gen_opc_buf. The reason for this was a too small MAX_OP_PER_INSTR, given a particular toolchain (here the one of SLES 10 for x86-32). So far it runs fine with

Quoted 7 lines

#define MAX_OP_PER_INSTR 64

Does anyone have an idea how to resolve the related comment in exec-all.h?

/* XXX: make safe guess about sizes */

Or should we just increase the safety margin?

Hi Jan,

I'm seeing this too, 64 seems to be enough for CRIS aswell. Unless someone has a better suggestion I think we should increase it.

Best regards

Signature · 2 lines
Edgar E. Iglesias
Axis Communications AB