Store coords and properties as vector in args
Before this CL, NotifyMotionArgs stored PointerCoords and PointerProperties in a fixed-size array. Upon creation of a new object, some of that data typically remained uninitialized. At the same time, the copy assignment operator was defaulted, which meant that the uninitialized data was getting accessed in order to copy the object. The sanitizers identify this as a problem and crash. To fix this, store these objects inside vectors. Bug: 271455682 Test: atest inputflinger_tests Change-Id: I9dba29f75df59a21f8ed7fd0f46fd1f6d45f2eef
Showing
- services/inputflinger/InputCommonConverter.cpp 3 additions, 3 deletionsservices/inputflinger/InputCommonConverter.cpp
- services/inputflinger/InputDeviceMetricsCollector.cpp 2 additions, 2 deletionsservices/inputflinger/InputDeviceMetricsCollector.cpp
- services/inputflinger/NotifyArgs.cpp 10 additions, 53 deletionsservices/inputflinger/NotifyArgs.cpp
- services/inputflinger/PreferStylusOverTouchBlocker.cpp 1 addition, 1 deletionservices/inputflinger/PreferStylusOverTouchBlocker.cpp
- services/inputflinger/UnwantedInteractionBlocker.cpp 18 additions, 17 deletionsservices/inputflinger/UnwantedInteractionBlocker.cpp
- services/inputflinger/dispatcher/InputDispatcher.cpp 12 additions, 9 deletionsservices/inputflinger/dispatcher/InputDispatcher.cpp
- services/inputflinger/include/NotifyArgs.h 6 additions, 4 deletionsservices/inputflinger/include/NotifyArgs.h
- services/inputflinger/tests/InputDispatcher_test.cpp 1 addition, 1 deletionservices/inputflinger/tests/InputDispatcher_test.cpp
- services/inputflinger/tests/InputReader_test.cpp 76 additions, 76 deletionsservices/inputflinger/tests/InputReader_test.cpp
- services/inputflinger/tests/TestInputListenerMatchers.h 2 additions, 2 deletionsservices/inputflinger/tests/TestInputListenerMatchers.h
- services/inputflinger/tests/UnwantedInteractionBlocker_test.cpp 9 additions, 8 deletions...es/inputflinger/tests/UnwantedInteractionBlocker_test.cpp
Loading
Please register or sign in to comment