diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index caaf647428..77787dd3ac 100755 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -371,7 +371,7 @@ function getZigAgent(platform, options) { * @returns {Agent} */ function getTestAgent(platform, options) { - const { os, arch } = platform; + const { os, arch, profile } = platform; if (os === "darwin") { return { @@ -391,6 +391,13 @@ function getTestAgent(platform, options) { } if (arch === "aarch64") { + if (profile === "asan") { + return getEc2Agent(platform, options, { + instanceType: "c8g.2xlarge", + cpuCount: 2, + threadsPerCore: 1, + }); + } return getEc2Agent(platform, options, { instanceType: "c8g.xlarge", cpuCount: 2, @@ -398,6 +405,13 @@ function getTestAgent(platform, options) { }); } + if (profile === "asan") { + return getEc2Agent(platform, options, { + instanceType: "c7i.2xlarge", + cpuCount: 2, + threadsPerCore: 1, + }); + } return getEc2Agent(platform, options, { instanceType: "c7i.xlarge", cpuCount: 2, diff --git a/scripts/runner.node.mjs b/scripts/runner.node.mjs index ead78ebbc2..fedfb07c8b 100755 --- a/scripts/runner.node.mjs +++ b/scripts/runner.node.mjs @@ -72,6 +72,7 @@ const cwd = import.meta.dirname ? dirname(import.meta.dirname) : process.cwd(); const testsPath = join(cwd, "test"); const spawnTimeout = 5_000; +const spawnBunTimeout = 20_000; // when running with ASAN/LSAN bun can take a bit longer to exit, not a bug. const testTimeout = 3 * 60_000; const integrationTimeout = 5 * 60_000; @@ -1152,6 +1153,9 @@ async function spawnBun(execPath, { args, cwd, timeout, env, stdout, stderr }) { } bunEnv["TEMP"] = tmpdirPath; } + if (timeout === undefined) { + timeout = spawnBunTimeout; + } try { const existingCores = options["coredump-upload"] ? readdirSync(coresDir) : []; const result = await spawnSafe({ diff --git a/src/bun.js/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp index 93efe7c2b5..f1f5cb0de6 100644 --- a/src/bun.js/bindings/bindings.cpp +++ b/src/bun.js/bindings/bindings.cpp @@ -4102,10 +4102,12 @@ extern "C" JSC::EncodedJSValue JSC__JSValue__getOwn(JSC::EncodedJSValue JSValue0 auto identifier = JSC::Identifier::fromString(vm, propertyNameString); auto property = JSC::PropertyName(identifier); PropertySlot slot(value, PropertySlot::InternalMethodType::GetOwnProperty); - if (value.getOwnPropertySlot(globalObject, property, slot)) { - RELEASE_AND_RETURN(scope, JSValue::encode(slot.getValue(globalObject, property))); - } - RELEASE_AND_RETURN(scope, {}); + bool hasSlot = value.getOwnPropertySlot(globalObject, property, slot); + RETURN_IF_EXCEPTION(scope, {}); + if (!hasSlot) return {}; + auto slotValue = slot.getValue(globalObject, property); + RETURN_IF_EXCEPTION(scope, {}); + return JSValue::encode(slotValue); } JSC::EncodedJSValue JSC__JSValue__getIfPropertyExistsFromPath(JSC::EncodedJSValue JSValue0, JSC::JSGlobalObject* globalObject, JSC::EncodedJSValue arg1)