summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorHarsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com>2025-06-05 13:44:06 +0530
committerGitHub <noreply@github.com>2025-06-05 08:14:06 +0000
commit624770a1e1ba7747cd7b2f5e0def1d677e931c8c (patch)
treec7bdb4e2087c8055d4b3ef1d9dbc79c176ff3ef3 /source/slang/slang.cpp
parent0c4c63b4a575f45f5dcf03f26b78becd36b0efca (diff)
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 <ellieh@nvidia.com>
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp3
1 files changed, 3 insertions, 0 deletions
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
{