Calling locale-aware date formatting inside secure-exec crashes the embedded V8 runtime process instead of returning a normal JS exception.
Repro:
const runtime = new NodeRuntime({
systemDriver: createNodeDriver({
permissions: allowAll,
processConfig: {
cwd: "/root",
env: {
TZ: "UTC",
},
},
}),
runtimeDriverFactory: {
createRuntimeDriver: (runtimeOptions) =>
new NodeExecutionDriver(runtimeOptions),
},
memoryLimit: memoryLimitMb,
cpuTimeLimitMs: 10_000,
timingMitigation: "freeze",
});
const crashingResult = await runtime.run(`
const d = new Date(1775666102.269619 * 1000);
export default d.toLocaleDateString("en-GB", {
month: "short",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
timeZone: "Europe/Warsaw",
});`,
"/root/locale-date-crash.mjs");
Plain Date usage works. The crash starts when locale-aware formatting is invoked.
Actual result
V8 runtime process killed by signal SIGTRAP
Child stderr includes a fatal OOM in ICU/V8:
Fatal process out of memory: DateTimePatternGeneratorCache::CreateGenerator
Versions
secure-exec: 0.2.1
@secure-exec/v8: 0.2.1
- Reproduced on macOS arm64
Notes
- This does not appear to be caused by input size.
Calling locale-aware date formatting inside
secure-execcrashes the embedded V8 runtime process instead of returning a normal JS exception.Repro:
Plain
Dateusage works. The crash starts when locale-aware formatting is invoked.Actual result
Child stderr includes a fatal OOM in ICU/V8:
Versions
secure-exec:0.2.1@secure-exec/v8:0.2.1Notes