summaryrefslogtreecommitdiff
path: root/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-05-02 23:48:50 +0000
committerGitHub <noreply@github.com>2025-05-02 16:48:50 -0700
commit7f9283a34b4aaf3401cdb652a2f9208b2b4ff4f4 (patch)
tree480af6df70e644cc029e2c1c04a84d811d315bc0 /tools/slang-unit-test/unit-test-find-check-entrypoint.cpp
parent6104a55548133f936b189fad011f90f067fe725b (diff)
Fix seg-fault in cudaCodeGenBug test (#6985)
`cudaCodeGenBug` is expected to fail on Linux, because the variable `code` is nullptr. When the next test tried to dereference, it causes a seg-fault.
Diffstat (limited to 'tools/slang-unit-test/unit-test-find-check-entrypoint.cpp')
-rw-r--r--tools/slang-unit-test/unit-test-find-check-entrypoint.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp b/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp
index 75da9aaf0..79a797c5a 100644
--- a/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp
+++ b/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp
@@ -133,6 +133,5 @@ SLANG_UNIT_TEST(cudaCodeGenBug)
ComPtr<slang::IBlob> code;
auto res = linkedProgram->getEntryPointCode(0, 0, code.writeRef(), diagnosticBlob.writeRef());
SLANG_CHECK(res == SLANG_OK);
- SLANG_CHECK(code != nullptr);
- SLANG_CHECK(code->getBufferSize() != 0);
+ SLANG_CHECK(code != nullptr && code->getBufferSize() != 0);
}