Skip to content

Python/flowgraph.c:528: _Bool all_exits_have_lineno(basicblock *): Assertion `0' failed #119233

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
alex opened this issue May 20, 2024 · 3 comments
Assignees
Labels
type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@alex
Copy link
Member

alex commented May 20, 2024

Crash report

What happened?

Minimal reproducer:

class i:
 if[super for()in e]:d<5<[super for()in e]
~/p/cpython ❯❯❯ ./python.exe -c 'class i:
                 if[super for()in e]:d<5<[super for()in e]'
Assertion failed: (0), function all_exits_have_lineno, file flowgraph.c, line 528.
fish: Job 1, './python.exe -c 'class i:' terminated by signal  if[super for()in e]:d<5<[super… (SIGABRT)
fish: Job Abort, '' terminated by signal  ()

Full ASAN:


fuzz_pycompile: Python/flowgraph.c:528: _Bool all_exits_have_lineno(basicblock *): Assertion `0' failed.
--
  | AddressSanitizer:DEADLYSIGNAL
  | =================================================================
  | ==21984==ERROR: AddressSanitizer: ABRT on unknown address 0x0539000055e0 (pc 0x7e01ee60600b bp 0x7e01ee77b588 sp 0x7ffca00d1d30 T0)
  | SCARINESS: 10 (signal)
  | #0 0x7e01ee60600b in raise /build/glibc-SzIz7B/glibc-2.31/sysdeps/unix/sysv/linux/raise.c:51:1
  | #1 0x7e01ee5e5858 in abort /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:79:7
  | #2 0x7e01ee5e5728 in __assert_fail_base /build/glibc-SzIz7B/glibc-2.31/assert/assert.c:92:3
  | #3 0x7e01ee5f6fd5 in __assert_fail /build/glibc-SzIz7B/glibc-2.31/assert/assert.c:101:3
  | #4 0x55acea525591 in all_exits_have_lineno cpython3/Python/flowgraph.c:528:21
  | #5 0x55acea525591 in _PyCfg_OptimizeCodeUnit cpython3/Python/flowgraph.c:2501:5
  | #6 0x55acea4b5a65 in optimize_and_assemble_code_unit cpython3/Python/compile.c:7640:9
  | #7 0x55acea4b5a65 in optimize_and_assemble cpython3/Python/compile.c:7682:12
  | #8 0x55acea4ddccd in compiler_class_body cpython3/Python/compile.c:2583:24
  | #9 0x55acea4c23e1 in compiler_class cpython3/Python/compile.c:2645:9
  | #10 0x55acea4c23e1 in compiler_visit_stmt cpython3/Python/compile.c:4017:16
  | #11 0x55acea4b9bea in compiler_body cpython3/Python/compile.c:1666:9
  | #12 0x55acea4b328b in compiler_codegen cpython3/Python/compile.c:1677:13
  | #13 0x55acea4b0671 in compiler_mod cpython3/Python/compile.c:1718:9
  | #14 0x55acea4b0671 in _PyAST_Compile cpython3/Python/compile.c:450:24
  | #15 0x55acea606eb0 in Py_CompileStringObject cpython3/Python/pythonrun.c:1450:10
  | #16 0x55acea606fa4 in Py_CompileStringExFlags cpython3/Python/pythonrun.c:1463:10
  | #17 0x55acea1abce1 in fuzz_pycompile cpython3/Modules/_xxtestfuzz/fuzzer.c:551:24
  | #18 0x55acea1abce1 in _run_fuzz cpython3/Modules/_xxtestfuzz/fuzzer.c:570:14
  | #19 0x55acea1abce1 in LLVMFuzzerTestOneInput cpython3/Modules/_xxtestfuzz/fuzzer.c:711:11
  | #20 0x55acea05dfd0 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:614:13
  | #21 0x55acea048764 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:327:6
  | #22 0x55acea04e1fa in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:862:9
  | #23 0x55acea07a5f2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
  | #24 0x7e01ee5e7082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/libc-start.c:308:16
  | #25 0x55acea03f23d in _start


CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Output from running 'python -VV' on the command line:

No response

@alex alex added the type-crash A hard crash of the interpreter, possibly with a core dump label May 20, 2024
@alex
Copy link
Member Author

alex commented May 20, 2024

cc: @iritkatriel

@carljm
Copy link
Member

carljm commented Jun 9, 2024

Closing as duplicate of #119666 - both are fixed by #120295.

@alex
Copy link
Member Author

alex commented Jun 10, 2024

But for real this time :-)

@alex alex closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

3 participants