summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputThread.cpp
diff options
context:
space:
mode:
author Pirama Arumuga Nainar <pirama@google.com> 2025-01-28 01:10:11 +0000
committer Pirama Arumuga Nainar <pirama@google.com> 2025-01-29 05:27:41 +0000
commitee2f164e7e67d5ae054cd35e7539731234fc816a (patch)
tree2aa57fd5ecc14a350e416a072cc8cea6014c7bcd /services/inputflinger/InputThread.cpp
parent52b4e75352b247ed97af76972579a2b472d07f73 (diff)
inputflinger_tests: Fix asan error about new-delete type mismatch
Cast the value returned by InputDispatcher::verifyInputEvent to the correct event type and call delete explicitly on the pointer. This fixes the `new-delete-type-mismatch` reported by asan with clang-r547379. We cannot rely on virtual destructor calls because InputEvent and subclasses don't have a virtual destructor. The proper fix is to either consider using std::variant in some way, or introduce an intermediate POD data structure that we will put the data into just prior to signing. Adding virtual functions to these classes is undesirable as the bytes in these objects are getting signed. Bug: 392703785 Test: run inputflinger_tests on the host with aosp/3419479 Change-Id: Ie78684539536c8b62acc8d540df57b2bbaac3649
Diffstat (limited to 'services/inputflinger/InputThread.cpp')
0 files changed, 0 insertions, 0 deletions