Skip to content

Add safety check to TFLite graph loader.#6247

Merged
copybara-service[bot] merged 2 commits intomainfrom
test_881015532
Mar 9, 2026
Merged

Add safety check to TFLite graph loader.#6247
copybara-service[bot] merged 2 commits intomainfrom
test_881015532

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Mar 9, 2026

Add safety check to TFLite graph loader.

Fix an issue that a malformed *.tflite file can cause crashes in TFLite if the graph has unresolved dependency.

PartitionGraphIntoIndependentNodeSubsetsImpl::Partition() in tflite/graph_info.cc assumes all non-kEpochAlwaysReady model outputs have a valid non-negative epoch index. If a model output tensor remains kEpochNotReady (-1), the code indexes node_subsets_[-1], causing memory corruption / segmentation fault.

@copybara-service copybara-service bot force-pushed the test_881015532 branch 2 times, most recently from cace680 to b9a62f8 Compare March 9, 2026 21:55
@copybara-service copybara-service bot merged commit 05b3057 into main Mar 9, 2026
@copybara-service copybara-service bot deleted the test_881015532 branch March 9, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants