mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
build: disable the runtimesecret GOEXPERIMENT under WSL2
The Go 1.26 runtimesecret experiment (stack/register zeroing for forward secrecy) SIGSEGVs at startup on the WSL2 kernel, confirmed on go1.26.3 and go1.26.4. Detect WSL via /proc/sys/kernel/osrelease and select GOEXPERIMENT=none there; every other platform keeps forward secrecy. Plain `make build` now produces a working luxd on WSL.
This commit is contained in:
@@ -7,8 +7,15 @@ CGO_ENABLED ?= 1
|
|||||||
FIPS_STRICT ?= 0
|
FIPS_STRICT ?= 0
|
||||||
|
|
||||||
# Go 1.26 experimental features:
|
# Go 1.26 experimental features:
|
||||||
# runtimesecret - zeroes stack/register state after secret.Do() for forward secrecy
|
# runtimesecret - zeroes stack/register state after secret.Do() for forward secrecy.
|
||||||
|
# It SIGSEGVs at startup under the WSL2 kernel (confirmed on go1.26.3 and go1.26.4), so enable
|
||||||
|
# it only off-WSL; forward secrecy stays on for real Linux/macOS/production builds.
|
||||||
|
WSL := $(shell grep -qiE 'microsoft|WSL' /proc/sys/kernel/osrelease 2>/dev/null && echo 1)
|
||||||
|
ifeq ($(WSL),1)
|
||||||
|
GOEXPERIMENT ?= none
|
||||||
|
else
|
||||||
GOEXPERIMENT ?= runtimesecret
|
GOEXPERIMENT ?= runtimesecret
|
||||||
|
endif
|
||||||
export GOEXPERIMENT
|
export GOEXPERIMENT
|
||||||
|
|
||||||
# FIPS 140-3 always enabled (required for blockchain/financial systems)
|
# FIPS 140-3 always enabled (required for blockchain/financial systems)
|
||||||
|
|||||||
Reference in New Issue
Block a user