From 624770a1e1ba7747cd7b2f5e0def1d677e931c8c Mon Sep 17 00:00:00 2001 From: "Harsh Aggarwal (NVIDIA)" Date: Thu, 5 Jun 2025 13:44:06 +0530 Subject: Fix crash when loading modules with syntax errors (#6993) (#7288) * Fix#6993 - Emit Diagnostic Warning and Fix SIGSEGV * Update external/slang-rhi submodule * Add checks for valid stage names for paq in SemanticsVisitor check * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska --- source/slang/slang.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 912cd2e10..d8879c690 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4182,6 +4182,9 @@ void Linkage::loadParsedModule( if (errorCountAfter != errorCountBefore) { // There must have been an error in the loaded module. + // Remove from maps if there were errors during semantic checking + mapPathToLoadedModule.remove(mostUniqueIdentity); + mapNameToLoadedModules.remove(name); } else { -- cgit v1.2.3