Community
Participate
Working Groups
The launcher crashes if we use a combination of "--launcher.openFile" and relative paths: /eclipse --launcher.openFile /tmp/hi # works. /eclipse hi # works. /eclipse --launcher.openFile /tmp/hi # works. /eclipse --launcher.openFile hi # crashes (when pwd is /tmp) Gdb gives us: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7750f71 in __strlen_avx2 () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff7750f71 in __strlen_avx2 () from /lib64/libc.so.6 #1 0x00007ffff0903c4b in checkPath (path=0x7fffffffdd58 "./eclipse.ini", programDir=0x0, reverseOrder=0) at ../eclipseCommon.c:532 #2 0x00007ffff08fc611 in parseArgs (pArgc=0x7fffffffd74c, argv=0x609140) at ../eclipse.c:897 #3 0x00007ffff08fb3d7 in run (argc=3, argv=0x609140, vmArgs=0x0) at ../eclipse.c:421 #4 0x000000000040163e in main (argc=17, argv=0x609140) at ../eclipseMain.c:217 Source code gives us this from eclipseCommon.c:532: _TCHAR* checkPath( _TCHAR* path, _TCHAR* programDir, int reverseOrder ) { ... paths[0] = reverseOrder ? programDir : workingDir; paths[1] = reverseOrder ? workingDir : programDir; .. buffer = malloc((_tcslen(paths[0]) + _tcslen(paths[1]) + _tcslen(path) + 2) * sizeof(_TCHAR)); # One of the strlen crashes. } It seems that one of the strlen function that reads one of the paths segfaults. My best guess is that there's a missing null terminator in one of the strings or it expects a path but is given '--launcher.openFile' instead. I need to debug and investigate what's happening here.
I can test the Gtk side. If I come up with a fix, will there be anyone to check the Win and Cocoa builds?
New Gerrit change created: https://git.eclipse.org/r/115725
As a note, I tested, this segFault occurs on Mac as well. (--launcher.openFile with relative paths, but not with abs paths).
Also crashes on Windows.
Sravan, this is worth rebuilding all archs are we ready to do so for win and mac too?
Gerrit change https://git.eclipse.org/r/115725 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=6ac11ebbb77fe77f89880d2f075daf2ac0c81d4b
Verified on linux/win/cocoa.
*** Bug 439459 has been marked as a duplicate of this bug. ***