Bug#1025307: yosys mips64el build failure (fix)

Daniel Gröber dxld at darkboxed.org
Fri Dec 2 12:32:23 GMT 2022


Hi Scott,

thanks for having a look.

On Mon, Nov 28, 2022 at 03:14:59PM +0000, Scott Ashcroft wrote:
> 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.

I'm not sure what you mean here, my reading of the code is that it's just
tring to read a big-endian uint32_t at the given address regardless of
alignment. No address is returned.

> Because the Debian build uses various hardening flags to protect
> accesses to the stack that makes a segfault.

While the code is indeed a bit iffy TBH I don't really see why it should
crash even with the stack protector etc. enabled.

Regardless if you still have a test environment could you try the attached
patch that turns the roundabout u8 to u32 conversion into a (hopefully)
more portable roundtrip through a union.

--Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-Fix-fstapi-mips64el-crash.patch
Type: text/x-diff
Size: 695 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20221202/dfdb56b8/attachment.patch>


More information about the debian-science-maintainers mailing list