numba: LLVM verify error: Terminator found in the middle of a basic block

Reporting a bug

I see the error below in a large piece of code that’s hard to reproduce. I’m using the master of Numba and dev version of llvmlite. Any ideas where to look for issues?

  File "/Users/etotoni/pse-hpc/python/numba/numba/compiler.py", line 731, in stage_nopython_backend
    self._backend(lowerfn, objectmode=False)
  File "/Users/etotoni/pse-hpc/python/numba/numba/compiler.py", line 681, in _backend
    lowered = lowerfn()
  File "/Users/etotoni/pse-hpc/python/numba/numba/compiler.py", line 668, in backend_nopython_mode
    self.metadata)
  File "/Users/etotoni/pse-hpc/python/numba/numba/compiler.py", line 1074, in native_lowering_stage
    cfunc = targetctx.get_executable(library, fndesc, env)
  File "/Users/etotoni/pse-hpc/python/numba/numba/targets/cpu.py", line 166, in get_executable
    baseptr = library.get_pointer_to_function(fndesc.llvm_func_name)
  File "/Users/etotoni/pse-hpc/python/numba/numba/targets/codegen.py", line 469, in get_pointer_to_function
    self._ensure_finalized()
  File "/Users/etotoni/pse-hpc/python/numba/numba/targets/codegen.py", line 104, in _ensure_finalized
    self.finalize()
  File "/Users/etotoni/pse-hpc/python/numba/numba/targets/codegen.py", line 221, in finalize
    self._final_module.verify()
  File "/anaconda3/envs/PA37/lib/python3.7/site-packages/llvmlite/binding/module.py", line 116, in verify
    raise RuntimeError(str(outmsg))
RuntimeError: Failed in nopython mode pipeline (step: nopython mode backend)
Terminator found in the middle of a basic block!
label %"_ZN4hpat8hiframes4join21copy_elem_buff$241518E16CategoricalArrayI766PDCategoricalDtype$28$5b$27AK$27$2c$20$27AL$27$2c$20$27AR$27$2c$20$27AZ$27$2c$20$27CA$27$2c$20$27CO$27$2c$20$27CT$27$2c$20$27DC$27$2c$20$27DE$27$2c$20$27FL$27$2c$20$27GA$27$2c$20$27HI$27$2c$20$27IA$27$2c$20$27ID$27$2c$20$27IL$27$2c$20$27IN$27$2c$20$27KS$27$2c$20$27KY$27$2c$20$27LA$27$2c$20$27MA$27$2c$20$27MD$27$2c$20$27ME$27$2c$20$27MI$27$2c$20$27MN$27$2c$20$27MO$27$2c$20$27MS$27$2c$20$27MT$27$2c$20$27NC$27$2c$20$27ND$27$2c$20$27NE$27$2c$20$27NH$27$2c$20$27NJ$27$2c$20$27NM$27$2c$20$27NV$27$2c$20$27NY$27$2c$20$27OH$27$2c$20$27OK$27$2c$20$27OR$27$2c$20$27PA$27$2c$20$27PR$27$2c$20$27RI$27$2c$20$27SC$27$2c$20$27SD$27$2c$20$27TN$27$2c$20$27TX$27$2c$20$27UT$27$2c$20$27VA$27$2c$20$27VI$27$2c$20$27VT$27$2c$20$27WA$27$2c$20$27WI$27$2c$20$27WV$27$2c$20$27WY$27$5d$29Li1E1C7mutable7alignedEx766PDCategoricalDtype$28$5b$27AK$27$2c$20$27AL$27$2c$20$27AR$27$2c$20$27AZ$27$2c$20$27CA$27$2c$20$27CO$27$2c$20$27CT$27$2c$20$27DC$27$2c$20$27DE$27$2c$20$27FL$27$2c$2"

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

@stuartarchibald Is there a reason -non-global-value-max-name-size can’t be used instead of patching LLVM? Patching LLVM makes numba much harder to package since you can’t use the system LLVM install anymore.