-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
platform:mobileissues related to ONNX Runtime mobile; typically submitted using templateissues related to ONNX Runtime mobile; typically submitted using template
Description
Describe the issue
With some (rare) models ONNXRuntime built for Android armeabi-v7a 32 bit architecture crashes with bus error. After re-compiling ORT with enabled sanitizers
-fsanitize=alignment -fno-omit-frame-pointer
I was able to find exact place:
/src/onnxruntime/core/optimizer/common_subexpression_elimination.cc:254:20: runtime error: reference binding to misaligned address 0xe022a091 for type 'const int64_t' (aka 'const long long'), which requires 8 byte alignment
0xe022a091: note: pointer points here
00 00 00 10 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 81 00 00 00 00 4e b5 00 00 00 00 00
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /src/onnxruntime/core/optimizer/common_subexpression_elimination.cc:254:20
Raw data buffers for tensor attributes of type char* has no proper alignment guarantees while reading values from them.
Platform
Android
OS Version
14
ONNX Runtime Installation
Built from Source
Compiler Version (if 'Built from Source')
NDK r28c
Package Name (if 'Released Package')
None
ONNX Runtime Version or Commit ID
ONNX Runtime API
C++/C
Architecture
ARM32
Execution Provider
Default CPU
Execution Provider Library Version
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
platform:mobileissues related to ONNX Runtime mobile; typically submitted using templateissues related to ONNX Runtime mobile; typically submitted using template