DynamoRIO / DynamoRIO/dynamorio
Not working on Android 10
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 30
Description
Workaround at #3543 not work anymore. This time seems some bug DR dealing with bionic libc.
After diffing bionic between P and Q beta, It seems that TLS structure is changed. I'm not sure this is the problem.
Firstly I think it is the issue of the newer kernel
`Linux localhost 4.14.69 #1 SMP PREEMPT Wed Jun 5 23:46:39 CST 2019 aarch64 Android`
But I tried DR with Linux 4.19 and glibc, it works fine. So it might be the bionic libc.
The target behavior:
Static link glibc no-pie running under Android Q: OK
Static link glibc pie running under Android Q: OK
Static link bionic no-pie running under Android Q: OK
Static link bionic pie running under Android Q: Not compiling
Dynamic link bionic no-pie running under Android Q: OK (Not sure why DR bypass linker PIE checking)
Dynamic link bionic pie running under Android Q: Stuck at some point
And I strace the DR and target with `strace -f ./bin64/drrun -c ./samples/bin64/libinscount.so -- ../hello_pie`, DR clone it self and creates a lot of subprocess as the same args as it self.
Debug mode would trigger ASSERT
```
$ ./bin64/drrun -debug -c ./samples/bin64/libinscount.so -- ../hello_pie
Client inscount is running
<(1+x) Handling our fault in a TRY at 0x0000007e99f788a8>
```
Contributor guide
Research direction
Start by reproducing the Android Q PIE cases with bin64/drrun and strace, then inspect the debug failure at core/vmareas.c:8175. Compare the reported bionic and glibc behaviors and the memory-map mismatch. Done means the bionic PIE cases no longer fail or stall and debug mode does not trigger the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, c, linux
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100