Skip to content

Conversation

@ElderDelp
Copy link

In the Galios submodule, the file
lonestar/scientific/cpu/longestedge/test/catch.hpp
around line 10732, a static constexp is declared that depends on the MINSIGSTKSZ

 // 32kb for the alternate stack seems to be sufficient. However, this value // is experimentally determined, so that's not guaranteed. static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; static SignalDefs signalDefs[] = { { SIGINT, "SIGINT - Terminal interrupt signal" }, 

This all works unless a clever set of system headers in signal.h expands MINSIGSTKSZ to sysconf ( SIGSTKSZ ).

When that happens, a very obscure bug throws an error when the Galios package runs a check.
This pull request adds a patch to check if MINSIGSTKSZ is defined and is a number, not a call. It that is not the case, then the constant is set to 32K.

There are some gratuitous spaces at the ends of line in ./build, but the key addition is the additional patch extra/Galois5

Copy link
Member

@rmanohar rmanohar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting issue... thanks for the patch!

@rmanohar rmanohar merged commit 44b775c into asyncvlsi:main Mar 6, 2025
@ElderDelp ElderDelp deleted the 2025-03-05-delp-galois-patch branch March 14, 2025 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants