This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Segmentation faults


>>>>> "Bryan" == Bryan Ha <kfh1_99@yahoo.com> writes:

Bryan> I seem to encounter a lot of segmentation faults when
Bryan> I try to use the system call (execve) with GCJ.
Bryan> Typically, if I don't use GCJ structure such as
Bryan> jstringArray to parse the arguments parsed from Java
Bryan> to C++, the program seems to function a bit better.

Are you passing jstringArray to execve()?  Don't do that.
jstringArray is not a C++ array (it is a structure) and it holds
_Java_ Strings, which are not what execve() expected.

Bryan> Does anybody have any experience of using system calls
Bryan> such as execve and kill with GCJ, it doesn't seem to
Bryan> be very predictable.

We do things like this throughout libgcj without problems.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]