Description
(Initially reported here, creating an issue to summarize: #438 (comment))
The problematic project is https://github.com/ImageOptim/libimagequant, a small reproducer is provided here: https://github.com/lazka/cargo-c-crash
Using the generated importlib to link to libimagequant results in a crash if liq_version()
is called (maybe libimagequant is at fault here and the cargo-c change is just exposing a bug? also an option -> other projects also fail the same way)
- cargo-c 0.10.4 creates a working import lib
- cargo-c 0.10.9 creates a broken import lib
Using cargo-c 0.10.9 and re-creating the importlib with dlltool (either from binutils or llvm) fixes the issue.
Here are the different import libs introspected with "llvm-objdump -x":
- working llvm importlib cargo-c 0.10.3: https://gist.github.com/lazka/89efb6328ac4208a4fa0c67b00cfab0e
- working gnu importlib cargo-c 0.10.3: https://gist.github.com/lazka/54d6225d1f14a1be5593ab1e1b265f81
- broken importlib cargo-c 0.10.9: https://gist.github.com/lazka/b44f77137d90304c57eafa11a8cc7fd9
Metadata
Metadata
Assignees
Labels
No labels
Activity