From 15f92441853330bf7133cb96f066fac13dc8ce9e Mon Sep 17 00:00:00 2001 From: Yijia Huang Date: Thu, 6 Apr 2023 14:56:40 -0700 Subject: [PATCH] Enable telemetry to debug top crash below JSModuleRecord::instantiateDeclarations https://bugs.webkit.org/show_bug.cgi?id=255089 rdar://107644069 Reviewed by Mark Lam. In 262608@main (79f0773): https://commits.webkit.org/262608@main, we landed a speculative mitigation against an unexplained crash where an AbstractModuleRecord pointer somehow got the same value jsUndefined. The speculative crash mitigation also added some Debug ASSERTs to help collect some bread crumb data about what went wrong to lead to this crash. This patch turns these Debug ASSERTs into RELEASE_ASSERTs to capture the telemetry data to help us diagnose this mysterious crash. * Source/JavaScriptCore/runtime/JSModuleRecord.cpp: (JSC::JSModuleRecord::instantiateDeclarations): Canonical link: https://commits.webkit.org/262687@main --- Source/JavaScriptCore/runtime/JSModuleRecord.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/JavaScriptCore/runtime/JSModuleRecord.cpp b/Source/JavaScriptCore/runtime/JSModuleRecord.cpp index 0a58a3ad3be8..93fc12a8b069 100644 --- a/Source/JavaScriptCore/runtime/JSModuleRecord.cpp +++ b/Source/JavaScriptCore/runtime/JSModuleRecord.cpp @@ -154,10 +154,9 @@ void JSModuleRecord::instantiateDeclarations(JSGlobalObject* globalObject, Modul #if CPU(ADDRESS64) // rdar://107531050: Speculative crash mitigation - // TODO: rdar://107634974 if (UNLIKELY(importedModule == bitwise_cast(encodedJSUndefined()))) { - ASSERT(vm.exceptionForInspection(), vm.traps().maybeNeedHandling(), vm.exceptionForInspection(), importedModule); - ASSERT(vm.traps().maybeNeedHandling(), vm.traps().maybeNeedHandling(), vm.exceptionForInspection(), importedModule); + RELEASE_ASSERT(vm.exceptionForInspection(), vm.traps().maybeNeedHandling(), vm.exceptionForInspection(), importedModule); + RELEASE_ASSERT(vm.traps().maybeNeedHandling(), vm.traps().maybeNeedHandling(), vm.exceptionForInspection(), importedModule); if (!vm.exceptionForInspection() || !vm.traps().maybeNeedHandling()) { throwSyntaxError(globalObject, scope, makeString("Importing module '", String(importEntry.moduleRequest.impl()), "' is not found.")); return;