Page MenuHomePhabricator

Fix "process load/unload" on android
ClosedPublic

Authored by nitesh.jain on Aug 8 2017, 12:00 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

nitesh.jain created this revision.Aug 8 2017, 12:00 AM
tberghammer added inline comments.Aug 8 2017, 2:10 AM
source/Plugins/Platform/Android/PlatformAndroid.cpp
376–378 ↗(On Diff #110142)

(nit): Formatting

384 ↗(On Diff #110142)

Can we use "if (!strcmp(dl_open_name, "__dl_dlopen"))" instead?

I am slightly concerned that some applications will have an unused and broken dlopen shim what we would detect with this code. I think the risk of having a random function named __dl_dlopen is lower then that.

clayborg added inline comments.Aug 8 2017, 7:58 AM
source/Plugins/Platform/Android/PlatformAndroid.cpp
384 ↗(On Diff #110142)

Shouldn't this if statement be looking for "__dl_dlopen" as the name in dl_open_name? Also you can avoid the strcmp and you can just do a pointer compare:

if (dl_open_name == dl_open_names[0])
nitesh.jain added subscribers: jaydeep, bhushan.

Update diff as per suggestion

nitesh.jain marked an inline comment as done.

Fix Format.

nitesh.jain marked 2 inline comments as done.Aug 9 2017, 5:01 AM
clayborg accepted this revision.Aug 9 2017, 10:49 AM
This revision is now accepted and ready to land.Aug 9 2017, 10:49 AM
tberghammer accepted this revision.Aug 10 2017, 2:39 AM

Thanks for fixing it

This revision was automatically updated to reflect the committed changes.