From 9d29971755053f54c908320f2759d43acd39456c Mon Sep 17 00:00:00 2001 From: deadprogram Date: Fri, 10 Apr 2026 14:48:01 +0200 Subject: [PATCH] interp: make ptrtoint size mismatch a recoverable error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Go 1.26 changed Darwin's rawSyscall/Syscall from assembly stubs to Go wrappers that call variadic rawsyscalln/syscalln. When the interp tries to evaluate syscall.init() at compile time (which calls Getrlimit → rawSyscall → rawsyscalln), it encounters a ptrtoint of a function pointer and fails with 'ptrtoint integer size does not equal pointer size'. Make this a recoverable error so the interp reverts the init interpretation and defers it to runtime, matching the behavior for other uninterpretable init functions. --- interp/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interp/errors.go b/interp/errors.go index 551a18d48..f6bfb5368 100644 --- a/interp/errors.go +++ b/interp/errors.go @@ -29,7 +29,7 @@ var errInvalidPtrToIntSize = errors.New("interp: ptrtoint integer size does not func isRecoverableError(err error) bool { return err == errIntegerAsPointer || err == errUnsupportedInst || err == errUnsupportedRuntimeInst || err == errMapAlreadyCreated || - err == errLoopUnrolled + err == errLoopUnrolled || err == errInvalidPtrToIntSize } // ErrorLine is one line in a traceback. The position may be missing.