Closed
Bug 325471
Opened 19 years ago
Closed 19 years ago
Broken search for path to binary on linux in xulrunner-stub
Categories
(Toolkit Graveyard :: XULRunner, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugz, Assigned: bugz)
Details
(Keywords: fixed1.8.0.4, fixed1.8.1)
Attachments
(1 file, 2 obsolete files)
|
2.44 KB,
patch
|
benjamin
:
first-review+
benjamin
:
approval-branch-1.8.1+
dveditz
:
approval1.8.0.2-
jay
:
approval1.8.0.4+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060131 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060131 Firefox/1.6a1
Current method of searching for real path to xulrunner-stub in somewhat broken. First it can lead to infinite loop, and also doesn't resolve symlinks for paths from PATH.
I attach patch shortly.
Reproducible: Always
Steps to Reproduce:
| Assignee | ||
Comment 1•19 years ago
|
||
This fixes infinite loop, and add symlinks resolving to xulrunner-stub
Attachment #210366 -
Flags: first-review?(benjamin)
Comment 2•19 years ago
|
||
Comment on attachment 210366 [details] [diff] [review]
v1
Could you provide a patch that does the same thing for the apprunner?
http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsAppRunner.cpp#1122
The tokenizing there is correct, but it should probably use realpath as you do here.
| Assignee | ||
Comment 3•19 years ago
|
||
This patches also nsAppRunner.cpp
Attachment #210366 -
Attachment is obsolete: true
Attachment #210371 -
Flags: first-review?(benjamin)
Attachment #210366 -
Flags: first-review?(benjamin)
Comment 4•19 years ago
|
||
Comment on attachment 210371 [details] [diff] [review]
v2
> while ( (token = nsCRT::strtok(newStr, ":", &newStr)) ) {
> sprintf(exePath, "%s/%s", token, argv0);
>- if (stat(exePath, &fileStat) == 0) {
>+ if (realpath(tmpPath, exePath) && stat(exePath, &fileStat) == 0) {
> found = PR_TRUE;
> break;
> }
You mean to change the sprintf to point to tmpPath, right?
Attachment #210371 -
Flags: first-review?(benjamin) → first-review-
| Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> You mean to change the sprintf to point to tmpPath, right?
>
Right.
Attachment #210371 -
Attachment is obsolete: true
Attachment #210374 -
Flags: first-review?(benjamin)
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•19 years ago
|
||
Comment on attachment 210374 [details] [diff] [review]
v3
r=me, get somebody on irc.mozilla.org #developers to land this. I'll grant 1.8.1 once we verify this works on trunk: 1.8.0.2 depends on getting some decent QA for this.
Attachment #210374 -
Flags: first-review?(benjamin)
Attachment #210374 -
Flags: first-review+
Attachment #210374 -
Flags: branch-1.8.1?
Attachment #210374 -
Flags: approval1.8.0.2?
Updated•19 years ago
|
Assignee: nobody → prefiks
Comment 7•19 years ago
|
||
Landed by timeless on the trunk.
mozilla/toolkit/xre/nsAppRunner.cpp 1.126 mozilla/xulrunner/stub/nsXULStub.cpp 1.5
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Attachment #210374 -
Flags: approval1.8.0.2? → approval1.8.0.2-
Updated•19 years ago
|
Attachment #210374 -
Flags: approval1.8.0.3?
Attachment #210374 -
Flags: approval-branch-1.8.1?
Attachment #210374 -
Flags: approval-branch-1.8.1+
Comment 8•19 years ago
|
||
This is a low-risk patch and I really want the xulrunner-stub bits for 1.8.0.3. The firefox-bin parts are not a big deal because we always launch firefox-bin with the shell script which passes the full path as argv[0].
Keywords: fixed1.8.1
Comment 9•19 years ago
|
||
Comment on attachment 210374 [details] [diff] [review]
v3
Please check in promptly on the 1.8.0 branch. Thanks!
Attachment #210374 -
Flags: approval1.8.0.3? → approval1.8.0.3+
Updated•9 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•