| Summary: | RCP application segfaults at startup when launched from bash with an empty PATH component | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | benedict | ||||||
| Component: | Launcher | Assignee: | Project Inbox <equinox.launcher-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | minor | ||||||||
| Priority: | P3 | CC: | aniefer, remy.suen, tjwatson | ||||||
| Version: | 3.5 | ||||||||
| Target Milestone: | 3.7 M7 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
benedict
Created attachment 189405 [details]
Strace from a segfault'ing launch
Shows the strlen(NULL) which causes the segfault, plus the strrchr('/') which fails to find a '/' character and returns NULL.
The launcher tries to find the absolute path to itself by scanning the PATH. It does not know to treat an empty entry as the CWD. This leaves us with a NULL programDir location. The segfault here is in eclipseMain/findLibrary() on the line progLength = pathLength = _tcslen(programDir); Similarly, I expect if the .ini file specifies a --launcher.library argument then there would be one in eclipseCommon/checkPath Created attachment 191541 [details]
patch
Patch was released to HEAD |