Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfaults on arm64 macOS #2238

Open
Baltoli opened this issue Jan 8, 2024 · 0 comments
Open

Segfaults on arm64 macOS #2238

Baltoli opened this issue Jan 8, 2024 · 0 comments

Comments

@Baltoli
Copy link
Contributor

Baltoli commented Jan 8, 2024

While debugging an unrelated issue, I noticed that the default build-from-source instructions cause a lot of the EVM tests to segfault on my new arm64 mac.

This is in fact something that's been identified previously in the smoke-testing script for KEVM:

# This test currently segfaults on M1 Macs
if ! ${APPLE_SILICON:-false}; then
kevm run tests/failing/static_callcodecallcodecall_110_OOGMAfter_2_d0g0v0.json --target llvm \
--mode NORMAL --schedule BERLIN --chainid 1 \
> tests/failing/static_callcodecallcodecall_110_OOGMAfter_2_d0g0v0.json.llvm-out \
|| git --no-pager diff --no-index --ignore-all-space -R tests/failing/static_callcodecallcodecall_110_OOGMAfter_2_d0g0v0.json.llvm-out tests/failing/static_callcodecallcodecall_110_OOGMAfter_2_d0g0v0.json.expected
rm -rf tests/failing/static_callcodecallcodecall_110_OOGMAfter_2_d0g0v0.json.llvm-out
fi

The underlying issue is actually in upstream LLVM; I fixed it with a patch to LLVM that landed in LLVM 17. Unfortunately, we are currently blocked on making LLVM 17 available to Nix builds of K: runtimeverification/llvm-backend#927. As a workaround, you can build K from source against LLVM 17 using Homebrew and point the KEVM build system at that K installation.

There isn't a fix for this issue as such; it will be resolved once Nix-built K can use LLVM 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant