Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324660 - bad handling of environment variables can cause the spawner library to crash the JVM
Summary: bad handling of environment variables can cause the spawner library to crash ...
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Core (show other bugs)
Version: 4.0.2   Edit
Hardware: Power PC Linux
: P3 blocker (vote)
Target Milestone: 4.0.3   Edit
Assignee: Chris Recoskie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-07 10:38 EDT by Chris Recoskie CLA
Modified: 2010-09-07 11:47 EDT (History)
1 user (show)

See Also:


Attachments
fix (2.67 KB, patch)
2010-09-07 10:38 EDT, Chris Recoskie CLA
recoskie: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Recoskie CLA 2010-09-07 10:38:12 EDT
Created attachment 178328 [details]
fix

There is a bit of a glitch in the SpawnerMiner, in that it improperly constructs the array of environment variables to send to the spawner.  The resulting array can end up with some null entries at the end.

The JNI libraries apparently do not like it when you try to convert a null reference that is supposed to be a UTF string, to a C string.  This causes the JVM to segfault on Linux/PPC.

Not sure why it doesn't crash on AIX.  It probably crashes on other platforms.

Patch attached.
Comment 1 Chris Recoskie CLA 2010-09-07 11:47:38 EDT
Fixed on ptp_4_0 and HEAD.