Bug#1025307: yosys mips64el build failure (fix)

Scott Ashcroft scott.ashcroft at talk21.com
Mon Nov 28 15:14:59 GMT 2022


Package: yosys
Version: 0.23-3

Hi,

I've done some work on why the mips64el build fails.
The issue is that the test script tests/sat/grom.ys makes yosys core in
libs/fst/fstapi.cc:fstGetUint32

Looking at the code it is clear that, when FST_DO_MISALIGNED_OPS is not
defined, an address on the stack is returned to calling function.
Because the Debian build uses various hardening flags to protect
accesses to the stack that makes a segfault.

The quick fix appears to be to add:

-DFST_DO_MISALIGNED_OPS

to CPPFLAGS. (i386 and amd64 already have this hardwired in the code.)

I've tested this best I could by cross-compiling and running the binary
under qemu. It passed all the tests in tests/sat.

The real fix would be to either assume that all architectures can run
with FST_DO_MISALIGNED_OPS and remove the broken code or fix
fstGetUint32 so it returns memory allocated correctly, but either of
those is a job for upstream.

Cheers, Scott



More information about the debian-science-maintainers mailing list