Closed fredcadete closed 1 week ago
Sadly we don't have the bandwidth to fix introspection, right now, so ... #8273
Per discussion in the dev meeting, I just perused the C++26 proposals and despite a fairly extensive introspection/reflection proposal, I don't see a way to get the name of a C++ variable being constructed into the constructor without providing it explicitly. C++23 does appear to have a library for stack traces:.
For the use case where a golang executable has a dynamic dependency on libHalide.so , introspection is throwing a segfault during dynamic linking.
Observed on:
A minimal reproduction is below. It involves a C++ wrapper to depend on Halide with a C API, and a go binary that uses cgo to depend on the wrapper.
libwrapper.cpp:
libwrapper.h:
main.go:
Build steps:
g++ libwrapper.cpp --std=c++17 -lHalide -fPIC -shared -o libwrapper.so
CGO_LDFLAGS="-L. -lwrapper -lHalide" go build -o test_go main.go
Execution:
Backtrace from GDB:
I was not able to identify the root cause, and worked around in a local build by deactivating introspection. Thank you for the useful library, and I hope the report is useful.