This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Segmentation faults
- To: Bryan Ha <kfh1_99 at yahoo dot com>
- Subject: Re: Segmentation faults
- From: Tom Tromey <tromey at redhat dot com>
- Date: 03 Sep 2001 10:29:45 -0600
- Cc: java at gcc dot gnu dot org
- References: <20010903103549.66048.qmail@web11005.mail.yahoo.com>
- Reply-To: tromey at redhat dot com
>>>>> "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