Commit Graph

5 Commits

Author SHA1 Message Date
Tom Cherry
1089bdfb43 Add liblog as a dependency where libbase is used
Bug: 119867234
Test: build
Change-Id: Iad0de2cef63aa52bb573e1571efbac1d689e7603
2020-01-09 11:11:28 -08:00
Paul Duffin
f3b039f1b6 Remove libnativehelper directories from include_dirs
Uses libnativehelper_header_only library headers instead.

Needed as libnativehelper is part of the runtime module and so will not
be present in an unbundled build, instead its build targets will be
provided as prebuilts.

Bug: 134379140
Test: m checkbuild
Change-Id: I8becbda3a202ddaed52eaf861ac94fe4b08807c2
2019-07-16 16:08:12 +01:00
Andreas Gampe
5e2a8849c7 LockAgent: Add ability to generate a native crash
Use the crasher to create a tombstone with the violation as the abort
message.

Test: m
Test: manual
Change-Id: I8c5041a4fbffedb11b6b9c564ab1e214551896bf
2019-06-20 16:30:06 -07:00
Andreas Gampe
3ffc019308 LockAgent: Add crasher binary
Add a helper that crashes with a given message.

Test: manual
Change-Id: I77e249484e65e7532045d0f8cc53ceb18d94bff5
2019-06-20 11:43:09 -07:00
Andreas Gampe
72ede720e2 Framework: Lock inversion checker
Add an agent-based lock inversion checker. The agent will dynamically
rewrite bytecode to inject calls to LockHook, which runs a checker
on these.

Implement a simple on-thread checker that keeps a per-thread stack
of locks and a global map of lock ordering. As-is, transitivity of
checks is not guaranteed, but should be captured in most practical
cases.

To run a process with the lock checker, start the process with the
agent. The helper script start_with_lockagent.sh can be used for this:

  adb shell setprop wrap.pkg-name script start_with_lockagent

(cherry picked from commit aeb6fce5b3)

Bug: 124744938
Test: manual
Merged-In: Idd9a7066a5b8cb8c0de2e995f08759c98d9473e1
Change-Id: Idd9a7066a5b8cb8c0de2e995f08759c98d9473e1
2019-04-12 10:46:04 -07:00