Closed Bug 530196 Opened 15 years ago Closed 15 years ago

Using a symlinked greDir fails to launch application from nsXULStub

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
Linux
defect
Not set
normal

Tracking

(status1.9.2 beta4-fixed, fennec1.0+)

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta4-fixed
fennec 1.0+ ---

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
A xulrunner-stub based application where the GRE (xulrunner) is on a symlinked folder will fail to launch. I have not been able to find the exact place the failure occurs. But I have a simple patch to fix the problem. The patch simply resolves the symlink in the stub before initializing XPCOM. I have an strace log of a failed launch, but nothing jumps out at me: https://people.mozilla.com/~mfinkle/fennec/profiles/strace1.log
Attachment #413708 - Attachment is patch: true
Attachment #413708 - Attachment mime type: application/octet-stream → text/plain
Attachment #413708 - Flags: review?(benjamin)
Blocks: 526791
blocks a fennec blocker
Comment on attachment 413708 [details] [diff] [review] patch >diff --git a/xulrunner/stub/nsXULStub.cpp b/xulrunner/stub/nsXULStub.cpp >+#ifdef MOZ_PLATFORM_HILDON >+ // Using a symlinked greDir will fail during startup. Not sure why, but if >+ // we resolve the symlink, everything works as expected. >+ char resolved_greDir[MAXPATHLEN] = ""; >+ if (realpath(greDir, resolved_greDir) && strlen(resolved_greDir) > 0) { >+ strncpy(greDir, resolved_greDir, MAXPATHLEN); >+ } >+#endif Is there any particular reason this should be HILDON-only? Please do this for all XP_UNIX unless there's a reason not to. In any case, the simpler way to say "strlen(resolve_greDir) > 0" is "*resolve_greDir"
Attachment #413708 - Flags: review?(benjamin) → review-
(In reply to comment #2) > (From update of attachment 413708 [details] [diff] [review]) > >diff --git a/xulrunner/stub/nsXULStub.cpp b/xulrunner/stub/nsXULStub.cpp > Is there any particular reason this should be HILDON-only? Please do this for > all XP_UNIX unless there's a reason not to. No reason. I was just being conservative. Changed to XP_UNIX. > In any case, the simpler way to say "strlen(resolve_greDir) > 0" is > "*resolve_greDir" Changed
Attached patch patch 2Splinter Review
Patch with review changes
Assignee: nobody → mark.finkle
Attachment #413708 - Attachment is obsolete: true
Attachment #414097 - Flags: review?(benjamin)
Attachment #414097 - Flags: review?(benjamin) → review+
tracking-fennec: --- → ?
Flags: blocking1.9.2?
tracking-fennec: ? → 1.0+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: blocking1.9.2? → blocking1.9.2+
Blocks: 550659
Blocks: 491245
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: