Fix TU_DEBUG persistent mutation and EnvVars parsing crash - #1999
Open
gigachadmma69 wants to merge 1 commit into
Open
Fix TU_DEBUG persistent mutation and EnvVars parsing crash#1999gigachadmma69 wants to merge 1 commit into
gigachadmma69 wants to merge 1 commit into
Conversation
Two bugs fixed:
1. TU_DEBUG sysmem injection was writing back to container storage via
container.setEnvVars(), permanently mutating the user's saved config
on every launch for non-Adreno 6xx devices. The default "noconform"
would accumulate ",sysmem" permanently. Now applies the sysmem flag
to the runtime envVars only, leaving the container's saved config
untouched.
2. EnvVars.putAll(String) would crash with StringIndexOutOfBoundsException
on malformed entries (e.g. trailing spaces, entries without "=").
Added a guard to skip entries where indexOf("=") returns <= 0.
Repository owner
deleted a comment from
ya8171808-hue
Jul 28, 2026
Repository owner
deleted a comment from
ya8171808-hue
Jul 28, 2026
Repository owner
deleted a comment from
ya8171808-hue
Jul 28, 2026
Repository owner
deleted a comment from
ya8171808-hue
Jul 28, 2026
Repository owner
deleted a comment from
ya8171808-hue
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix TU_DEBUG persistent mutation: On non-Adreno 6xx devices, the
sysmemflag injection was callingcontainer.setEnvVars()which permanently mutated the user's saved container configuration on every launch. The defaultTU_DEBUG=noconformwould accumulate,sysmemin the saved config. Now applies thesysmemflag to the runtimeenvVarsobject only, leaving the container's saved configuration untouched.Fix EnvVars.putAll() crash:
putAll(String)would throwStringIndexOutOfBoundsExceptionwhen encountering malformed entries (trailing spaces, entries without=), sinceindexOf("=")returns -1 which causessubstring(0, -1)to crash. Added a guard to skip entries where the=separator is missing or at position 0.Test plan
TU_DEBUGincludessysmemat runtimeTU_DEBUGvalue is still the user's original (e.g.,noconform), notnoconform,sysmem