Skip to content

Copybara import of the project: - #11083

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test_971404428
Aug 27, 2026
Merged

Copybara import of the project:#11083
copybara-service[bot] merged 2 commits into
masterfrom
test_971404428

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Copybara import of the project:

--
89ef795 by destro4evr-rgb destro4evr@proton.me:

litert/xnnpack: guard against empty axis buffer in SplitOperation::ToXnnpack()

axis_info.buffer != nullptr only verifies the Buffer object exists, not that
it contains data. A TFLite flatbuffer can declare a constant tensor with a
non-null Buffer entry but zero bytes, which is valid per the schema.
buffer->Lock().As() then returns a LockedBufferSpan with a
null data pointer (LockedBufferSpan::Empty() in buffer.h:72), and
locked_axis.data()[0] dereferences null -> SIGSEGV at model load time.

Add the same locked_axis.size() == 0 guard already present in
ExpandDimsOperation::ToXnnpack() (lines 1203-1208).
FUTURE_COPYBARA_INTEGRATE_REVIEW=#11058 from destro4evr-rgb:fix/litert-split-empty-axis-buffer-null-deref 89ef795

destro4evr-rgb and others added 2 commits August 22, 2026 08:00
…Xnnpack()

axis_info.buffer != nullptr only verifies the Buffer object exists, not that
it contains data. A TFLite flatbuffer can declare a constant tensor with a
non-null Buffer entry but zero bytes, which is valid per the schema.
buffer->Lock().As<const int32_t>() then returns a LockedBufferSpan with a
null data pointer (LockedBufferSpan::Empty() in buffer.h:72), and
locked_axis.data()[0] dereferences null -> SIGSEGV at model load time.

Add the same locked_axis.size() == 0 guard already present in
ExpandDimsOperation::ToXnnpack() (lines 1203-1208).
…axis-buffer-null-deref

PiperOrigin-RevId: 971606254
@copybara-service
copybara-service Bot merged commit 073f3b0 into master Aug 27, 2026
25 of 27 checks passed
@copybara-service
copybara-service Bot deleted the test_971404428 branch August 27, 2026 00:49
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