Skip to content

Failed assert when lowering UOP_MAX_TRACE_LENGTH to 200 #117434

Closed
@gvanrossum

Description

@gvanrossum

Crash report

See faster-cpython/ideas#669 (comment)

By lowering UOP_MAX_TRACE_LENGTH to 200 I managed to cause a failing assert in this line in translate_bytecode_to_trace() in optimizer.c:

    if (trace[trace_length-1].opcode != _JUMP_TO_TOP) {
        ADD_TO_TRACE(_EXIT_TRACE, 0, 0, target);
    }

I suspect a missing RESERVE() or RESERVE_RAW() call somewhere.

While I didn't see this with higher max trace length, I suspect that the bug is universal, just harder to tickle (there aren't that many long traces).

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions