Source: rust-leptonica-sys
Severity: serious
Tags: upstream
Justification: RT
X-Debbugs-Cc: noisyc...@tutanota.com
Control: affects -1 + src:rust-tesseract-sys

Hi,

The recent bindgen update uncovered an i386 bug which was already present in
leptonica-sys, namely, the one described in [1]. It manifested itself in
tesseract-sys' autopkgtests. According to bindgen's maintainers, there's not
much bindgen can do about it. Libraries' maintainers should deal with it by
either making the max_align_t type opaque if the library is actually using
the type, or by blacklisting it from the bindings if the library is not using
it.

In more detail: starting from v0.70, bindgen switched from layout tests in
the form of cargo tests, to compile-time tests [2]. Running `cargo test` on
the unpatched upstream crate, which still uses bindgen v0.64, shows that the
`bindgen_test_layout_max_align_t` test, which is automatically generated by
bindgen, fails on i386. On Debian infrastructure, bindgen layout tests are
not run for some reason which I was not able to identify yet: [3] shows that
only 3 tests are executed, but for the upstream crate 73 tests are run when
executing `cargo test`, 70 of which are bindgen layout tests and include the
failing one. When bindgen switched from actual tests to compile-time tests in
v0.70, the very same failure (just now with a slightly different output)
started to show up not in leptonica-sys, but in tesseract-sys, which
evidently at some point must import the leptonica bindings. In the leptonica
bindings, layout test failures now manifest themselves as compilation failures,
and this makes tesseract-sys' autopkgtests fail.

I've marked this bug as serious because of tesseract-sys's autopkgtest failure,
although I should note this is not a regression from previous behavior, just
something that showed up after the upgrade. Still, a compilation failure may
have far-reaching consequences.

Best.


[1]: https://github.com/rust-lang/rust-bindgen/issues/1823
[2]: https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md#changed-2
[3]: https://ci.debian.net/packages/r/rust-leptonica-sys/testing/amd64/54595820/

Reply via email to