Skip to content

Strict Aliasing Rule#3390

Draft
veblush wants to merge 1 commit intotensorflow:mainfrom
veblush:qutil
Draft

Strict Aliasing Rule#3390
veblush wants to merge 1 commit intotensorflow:mainfrom
veblush:qutil

Conversation

@veblush
Copy link
Collaborator

@veblush veblush commented Jan 31, 2026

Replaced union-based type punning with std::memcpy in quantization_util.cc. Accessing a union member different from the one written to is undefined behavior in C++ (Strict Aliasing Rule).

This is not supposed to get merged as this needs tflite-side change.

BUG=n/a

@TFLM-bot TFLM-bot added the ci:ready Triggers the basic TFLM test suite. label Jan 31, 2026
@veblush veblush added the ci:full Triggers the comprehensive cross-platform test suite. label Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Triggers the comprehensive cross-platform test suite. ci:ready Triggers the basic TFLM test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants