Last Comment Bug 716825 - Don't load system libraries with their full path
: Don't load system libraries with their full path
Status: RESOLVED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: P3 normal (vote)
: Firefox 12
Assigned To: Mike Hommey [:glandium]
:
: Sebastian Kaspari (:sebastian)
Mentors:
Depends on: 719253
Blocks: 683127
  Show dependency treegraph
 
Reported: 2012-01-10 00:46 PST by Mike Hommey [:glandium]
Modified: 2012-02-22 14:30 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
11+


Attachments
Avoid loading system libraries with their full path (8.01 KB, patch)
2012-01-10 11:35 PST, Mike Hommey [:glandium]
jacob.benoit.1: review+
blassey.bugs: review+
gal: review+
Details | Diff | Splinter Review
Avoid loading system libraries with their full path - for aurora (5.44 KB, patch)
2012-01-25 09:42 PST, Mike Hommey [:glandium]
mh+mozilla: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2012-01-10 00:46:27 PST
One of the assumptions of the new linker (bug 683127) is that dlopen()ing a file by giving a full path is not used for system libraries. As dlopen() is only diverted for libraries the new linker loads itself, this makes things work for system libraries that dlopen with a full path, but it happens that contrary to what we do on desktop linux, it turns out we are dlopening with full paths for system libraries on android. There's really no reason that force us to do so, but it breaks the new linker assumptions.
Comment 1 Mike Hommey [:glandium] 2012-01-10 11:35:41 PST
Created attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

Pushed to try. See rationale in comment 0. I also changed libEGL.so and libGLESv2.so on desktop linux, because they are not necessarily in /usr/lib (on debian they are in a multiarch directory), and they are actually not named libEGL.so and libGLESv2.so except in -devel packages.
http://tbpl.mozilla.org/?tree=Try&rev=f977c50be911

(will add some more people for review of the non gfx parts)
Comment 2 Mike Hommey [:glandium] 2012-01-10 11:37:24 PST
Comment on attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

For dom/wifi parts.
Comment 3 Benoit Jacob [:bjacob] (mostly away) 2012-01-10 11:38:40 PST
Comment on attachment 587408 [details] [diff] [review]
Avoid loading system libraries with their full path

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

r=me on the gfx parts
Comment 5 Marco Bonardo [::mak] 2012-01-14 01:15:34 PST
https://hg.mozilla.org/mozilla-central/rev/065691d7581c
Comment 6 Oleg Romashin (:romaxa) 2012-01-18 15:17:37 PST
why with full path removal, library names where changed?
basically on Maemo/N9, it fail to load libEGL.so.1, because that simply does not exists
Comment 7 Mike Hommey [:glandium] 2012-01-18 22:59:50 PST
(In reply to Oleg Romashin (:romaxa) from comment #6)
> why with full path removal, library names where changed?
> basically on Maemo/N9, it fail to load libEGL.so.1, because that simply does
> not exists

See comment 1. We could probably try .so.1 *and* .so on non-android.
Comment 8 Mike Hommey [:glandium] 2012-01-25 09:42:34 PST
Created attachment 591509 [details] [diff] [review]
Avoid loading system libraries with their full path - for aurora

[Approval Request Comment]
This is a dependency of bug 683127.
For tier-1 platforms, this is mostly a no-op. Libraries are opened with dlopen and will be searched in the paths that were hardcoded previously. Except it will also now work when the libraries are in different system library paths.
It however causes bug 719253 on maemo.
Comment 9 Alex Keybl [:akeybl] 2012-01-25 17:04:03 PST
Comment on attachment 591509 [details] [diff] [review]
Avoid loading system libraries with their full path - for aurora

[Triage Comment]
Mobile only - approved for Aurora.
Comment 10 Mike Hommey [:glandium] 2012-01-26 23:57:51 PST
https://hg.mozilla.org/releases/mozilla-aurora/rev/9dbdd072eb4e
Comment 11 Curtis Koenig [:curtisk-use curtis.koenig+bzATgmail.com]] 2012-02-22 14:30:16 PST
since this is android only we don't see a need to reivew, removing flag

Note You need to log in before you can comment on or make changes to this bug.