--- v8/src/flags/flags.cc.orig 2026-03-13 16:54:03 UTC +++ v8/src/flags/flags.cc @@ -17,6 +17,10 @@ #include #include +#if V8_OS_OPENBSD +#include +#endif + #include "src/base/fpu.h" #include "src/base/hashing.h" #include "src/base/lazy-instance.h" @@ -861,6 +865,10 @@ void FlagList::FreezeFlags() { // Note that for string flags we only protect the pointer itself, but not the // string storage. TODO(12887): Fix this. base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags)); +#if V8_OS_OPENBSD + if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1) + FATAL("unable to set immutability of v8_flags"); +#endif } // static