Snaipe / Criterion

A cross-platform C and C++ unit testing framework for the 21st century
MIT License
2.04k stars 181 forks source link

wsl,boxfort: mincore fails with ENOTSUP in arena code #424

Closed Snaipe closed 2 years ago

Snaipe commented 2 years ago

A couple of users on WSL seem to be hitting the following error (#364)

mincore(2) returned an unexpected error: Function not implemented This is a bug; please report it on the repository's issue tracker. Aborted (core dumped)

It's fairly disappointing to see that the WSL glibc goes out of its way to export mincore, but ends up not implementing it. That said, if we assume that our debian packages will end up running on WSL at some point, it might be reasonable enough to fix this in BoxFort.

I don't know if there's a separate WSL branch of ubunu but if there isn't, having a feature toggle to disable the mincore check on WSL might not be sufficient, and instead msync should always be used as fallback to mincore on ENOTSUP.

MrAnno commented 2 years ago

WSL 2 works as expected, I'm now checking WSL 1.

MrAnno commented 2 years ago

The WSL 1 version of Ubuntu uses unmodified packages too, even glibc is untouched (2.31-0ubuntu9.2).

mincore in WSL 1 is not supported: https://docs.microsoft.com/en-us/windows/wsl/release-notes

I'm working on the runtime fallback.