This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Segmentation faults
- To: tromey at redhat dot com, Bryan Ha <kfh1_99 at yahoo dot com>
- Subject: Re: Segmentation faults
- From: Bryan Ha <kfh1_99 at yahoo dot com>
- Date: Tue, 4 Sep 2001 11:52:58 +0100 (BST)
- Cc: java at gcc dot gnu dot org
Tom,
I am using the char*[] I got out from the jstringarray
using the procedure you showed me last time. I have
printed out the arguments and it seems okay.
Anyway, if this has been done before, I have done
something wrong. I will check that again.
Many thanks for your prompt and helpful replies,
Bryan
--- Tom Tromey <tromey@redhat.com> wrote: > >>>>>
"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
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie