Closed tpwrules closed 1 year ago
Thanks for reporting!
I can't actually reproduce a crash, as this is going to be quite dependent on memory layouts, etc, but playing around with valgrind hunted it down to https://github.com/YosysHQ/nextpnr/pull/1139, after which I see no invalid accesses.
Can you confirm that actually fixes the crash for you as well?
It crashes on master and applying that PR indeed fixes the crash. The design appears to work as well.
Thanks for the quick fix. I will let you close this issue when the PR is merged and/or released.
The design is generated from a simple LiteX demo generated using the latest-ish commits. I have attached the generated design gateware for convenience. Running the build script should be sufficient to reproduce the crash. This crash doesn't seem to happen on Linux x86_64 using GCC 12.2.0 but happens on macOS using Clang 11.1.0.
I bisected the first bad commit to 86699b42f619960bfefd4d0b479dd44a90527ea4. Before that commit nextpnr-ecp5 works fine on macOS and does not crash and the produced design functions on the board. Other designs which don't use the DCUs or EXTREF blocks work on all versions.
I verified that this crash also occurs on the oss-cad-suite 2023-04-09 prepackaged binaries too. The log using them is below. I can provide Nix expressions on request if helpful. I am not 100% sure if this is a macOS vs Linux issue or a Clang vs GCC issue. Linux x86_64 Clang 11.1.0 seemed to work fine but I don't know what other environment or stdlib differences there might be.
bug.tar.gz