Closed Bug 901282 Opened 11 years ago Closed 5 months ago

dlsym(dlopen) should return __wrap_dlopen instead of system dlopen

Categories

(Core :: mozglue, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: gw280, Unassigned)

Details

Attachments

(1 file)

This behaviour currently breaks apitrace, because it calls dlopen by getting a function pointer from dlsym(RTLD_DEFAULT, "dlopen"), which returns system dlopen. It then dies later on because it calls dlsym directly, which calls into __wrap_dlsym and has an incompatible handle type to system dlopen.
Comment on attachment 785442 [details] [diff] [review]
0001-Bug-901282-dlsym-dlopen-should-return-__wrap_dlopen-.patch

Review of attachment 785442 [details] [diff] [review]:
-----------------------------------------------------------------

You can probably use that locally for your tests, but that's not quite the right thing to do. First, you'd need to handle more than dlopen (see CustomElf::GetSymbolPtrInDeps), and to handle them for RTLD_DEFAULT and RTLD_NEXT only.
Attachment #785442 - Flags: review?(mh+mozilla) → review-
Assignee: nobody → gwright

The bug assignee didn't login in Bugzilla in the last 7 months.
:glandium, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: gw → nobody
Flags: needinfo?(mh+mozilla)
Severity: normal → S3

Since Android 6, we just fallback to the system functions, so it doesn't matter anymore. I don't think we have any interest in making apitrace work on Android < 6.

Status: NEW → RESOLVED
Closed: 5 months ago
Flags: needinfo?(mh+mozilla)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: