Closed feliwir closed 8 months ago
I was running Fritzing compiled with UBSan (undefined behaviour sanitizer) and there are a couple places where the app reads from uninitialized variables (and uses those):
Fritzing
m_lastPropsSwappingEnabled
m_viewLayerID
w*h
612625 * 199763
This list is probably not complete yet - i need to check the entire functionality
Build: Latest / Any
Operating System: Linux 64-bit
Steps to reproduce: Compile with UBSan
UBSan
No undefined behaviour at runtime. If i know what the sensible default values should be i can do a PR
Partially solved for 1.0.2 : I used memcheck to point me to initialized uninitialized variables created on the heap.
Current Behaviour
I was running
Fritzing
compiled with UBSan (undefined behaviour sanitizer) and there are a couple places where the app reads from uninitialized variables (and uses those):m_lastPropsSwappingEnabled
does never get initialized or set at all - making the check for it undefinedm_viewLayerID
gets retrieved but is not initialized - making the content of it undefinedw*h
multiplications below) a signed integer overflow occurs (e.g.612625 * 199763
) - making this undefinedThis list is probably not complete yet - i need to check the entire functionality
Build: Latest / Any
Operating System: Linux 64-bit
Steps to reproduce: Compile with
UBSan
Expected Behaviour
No undefined behaviour at runtime. If i know what the sensible default values should be i can do a PR