glslang: Add hack to fix crashes on use of the CLI.

Mesa 25 needs this tool.
This commit is contained in:
Augustin Cavalier
2025-12-31 15:44:39 -05:00
parent 75df229b57
commit cbe60cc16d
2 changed files with 34 additions and 1 deletions

View File

@@ -35,9 +35,10 @@ LICENSE="Apache v2
BSD (2-clause)
BSD (3-clause)
MIT"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/KhronosGroup/glslang/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="172385478520335147d3b03a1587424af0935398184095f24beab128a254ecc7"
PATCHES="glslang-16.0.0.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

View File

@@ -0,0 +1,32 @@
From 6591f2be7f977d296bfb748b2bb2c0c38cee4a13 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Wed, 31 Dec 2025 15:37:20 -0500
Subject: HACK: Don't finalize in the command-line tool to avoid
use-after-frees.
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 7734bb8..3ccaffc 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -1755,7 +1755,7 @@ int singleMain()
glslang::FinalizeProcess(); // also test reference counting of users
glslang::FinalizeProcess(); // also test reference counting of users
CompileAndLinkShaderFiles(workList);
- glslang::FinalizeProcess();
+ //glslang::FinalizeProcess();
} else {
ShInitialize();
ShInitialize(); // also test reference counting of users
@@ -1786,7 +1786,7 @@ int singleMain()
}
}
- ShFinalize();
+ //ShFinalize();
}
if (CompileFailed.load())
--
2.52.0