Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324660

Summary: bad handling of environment variables can cause the spawner library to crash the JVM
Product: [Tools] PTP Reporter: Chris Recoskie <recoskie>
Component: CoreAssignee: Chris Recoskie <recoskie>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: ptp-inbox
Version: 4.0.2   
Target Milestone: 4.0.3   
Hardware: Power PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix recoskie: iplog-

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.