[Mlir-commits] [mlir] [mlir][python] Make test stubgen depend on _mlirRegisterEverything (PR #235462)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Oct 25 15:44:45 PDT 2026
aidint wrote:
Sure, here is the error:
```
FAILED: [code=1] tools/mlir/python/type_stubs/_mlir_libs/_mlirPythonTestNanobind.pyi <build>/tools/mlir/python/type_stubs/_mlir_libs/_mlirPythonTestNanobind.pyi
cd <llvm-project>/mlir/cmake/modules && /usr/bin/cmake -E env PYTHONPATH="" <venv>/bin/python3.14 <venv>/lib/python3.14/site-packages/nanobind/stubgen.py --module mlir._mlir_libs._mlirPythonTestNanobind -i <build>/tools/mlir/python_packages/mlir_core --recursive --include-private --output-dir <build>/tools/mlir/python/type_stubs/_mlir_libs --quiet && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile <llvm-project>/llvm <llvm-project>/mlir/python <build> <build>/tools/mlir/python <build>/tools/mlir/python/type_stubs/_mlir_libs/mlir._mlir_libs._mlirPythonTestNanobind.d <build>/CMakeFiles/d/<hash>.d
free(): invalid pointer
Subprocess aborted
```
It happened on an incremental rebuild of a build directory last built in May (23.0git), after updating to main (24.0git). According to `.ninja_log`, `_mlir` and `_mlirPythonTestNanobind` had just been relinked when stubgen ran, but `_mlirRegisterEverything` was still the May build.
To confirm the cause, I built only `_mlirRegisterEverything` from a May (23.0git) commit (04025adc8c) and put it into my current 24.0git build directory. With that stale module, the same stubgen command fails with the same `free(): invalid pointer`. With the freshly built module, or without it, stubgen succeeds.
https://github.com/llvm/llvm-project/pull/235462
More information about the Mlir-commits
mailing list