Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Failed assert when lowering UOP_MAX_TRACE_LENGTH to 200 #117434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gvanrossum opened this issue Apr 1, 2024 · 1 comment
Closed

Failed assert when lowering UOP_MAX_TRACE_LENGTH to 200 #117434

gvanrossum opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@gvanrossum
Copy link
Member

gvanrossum commented Apr 1, 2024

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).

@gvanrossum gvanrossum added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 1, 2024
@gvanrossum gvanrossum self-assigned this Apr 1, 2024
@markshannon
Copy link
Member

May have been fixed by #118106, but I haven't checked it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

2 participants