imagej / imagej-launcher

The ImageJ native launcher
https://imagej.net/learn/launcher
BSD 2-Clause "Simplified" License
21 stars 23 forks source link

Running imagej-launcher with a badly formatted PATH causes segfaults #19

Closed benwbooth closed 10 years ago

benwbooth commented 10 years ago

If I try to run ImageJ with a PATH that has empty values, e.g.:

PATH=/usr/local/sbin::/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ./ImageJ-macosx

(Notice the "::" after /usr/local/sbin) The result is:

Segmentation fault: 11

If I run Fiji.app with the same PATH under Mac OS X, I get the following in the Error Report:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
dscho commented 10 years ago

Whoa! Awful bug! I can confirm that is the case. My reproducer looks like this: PATH=::$PATH ./ImageJ-macosx.

dscho commented 10 years ago

Fixed in 1e439f8.