Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ffe62933 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Initialize InputEventLookup in a static function

Currently, the InputEventLookup class uses static fields, which means
that they are getting initialized early.

This causes issues with address sanitizers. The sanitizers report a
memory leak with the purely static approach. It's not clear whether this
is an actual issue, or just a bug elsewhere in the system.

To get around these problems, create a singleton instance of
InputEventLookup. This singleton will be created upon the first access
to any of its static functions. This helps resolves the sanitizer issues.

Bug: 271455682
Test: FUZZER=inputflinger_input_dispatcher_fuzzer; m $FUZZER && out/host/linux-x86/fuzz/x86_64/$FUZZER/$FUZZER
Note: test requires more CLs that are upcoming
Change-Id: Id655554db9c706f5d45eaebbee55e12519dcfdc8
parent 02deea60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment