Title: FW: embeded perl - perl_parse crashes Java 1.2.2 and Java 1.3.0, but not Java 1.1.8

Hi,

Just FYI about a problem I had with JDK 1.2 and JDK 1.3 with perl 5.6.1.

One needs to add "-DNEED_ENVIRON_DUP_FOR_MODIFY" when compiling perl 5.6.1 in order to work with JDK 1.2 and 1.3, at least on Solaris 2.6, 2.7, and 2.8.

Without this symbol, perl 5.6.1 can work with JDK 1.1.

What happened was that Java VM passes environment variables to perl and perl updates it directly.  In JDK 1.1 the env. variables are in a read/write-able memory block.  But in JDK 1.2/1.3 it's in a READ/EXEC memory block.  Defining this symbol resolves this problem.

It might be useful to add this info. to perl's README file.

Thanks.

Kong


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 10:45 AM
To: [EMAIL PROTECTED]
Subject: Re: embeded perl - perl_parse crashes Java 1.2.2 and Java
1.3.0, but not Java 1.1.8


hi, you should use the [EMAIL PROTECTED] or [EMAIL PROTECTED] lists
for help.

On 22 May 2001 [EMAIL PROTECTED] wrote:

> Hi, Doug,
> not sure if your email address is correct.  Any suggestions/recommendations about the problem is welcome.  Thanks!
>
> Kong
>
>
> ------- Start of forwarded message -------

> Subject: embeded perl - perl_parse crashes Java 1.2.2 and Java 1.3.0,
>       but not Java 1.1.8
> To: Doug MacEachern <[EMAIL PROTECTED]>, Jon Orwant <[EMAIL PROTECTED]>
> From: [EMAIL PROTECTED]
> Date: 22 May 2001 17:59:11 PDT
>
>
> Hi, Jon/Doug,
>
> I was trying embeded Perl (5.6.1) but encountered problem with Java 1.3.  See the enclosed email for details.  Any suggestions is welcome.  Thanks!

>
> Kong
> [EMAIL PROTECTED]
>
>
> ------- Start of forwarded message -------

> Subject: embeded perl - perl_parse crashes Java 1.2.2 and Java 1.3.0, but not Java 1.1.8
> To: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> Date: Tue, 22 May 2001 17:48:33 -0700
>
> From: [EMAIL PROTECTED] (Kong Li)
> Newsgroups: comp.lang.perl.misc,comp.lang.java.programmer,comp.lang.java.help
> Subject: embeded perl - perl_parse crashes Java 1.2.2 and Java 1.3.0, but not Java 1.1.8
> NNTP-Posting-Host: 205.158.27.27
> Message-ID: <[EMAIL PROTECTED]>
>
> Hi,
>
> I was trying to call embedded perl (5.6.1) in Java (1.3.0 and 1.2.2)
> via JNI interface.  The perl_parse() function keeps crashing/core
> dump.  But the same code works fine with Java 1.1.8.  A simiple
> printf("Hello world\n") works fine in all Java versions.
>
> Environment:
> Solaris 2.8 (with the patches required/recommended by Sun)
> Perl 5.6.1
> Java 1.3.0_02
>
> With Java 1.3.0_02, the following is the error message:
> # # An unexpected exception has been detected in native code outside
> the VM.# Program counter=0xeb226808
> #
> # Problematic Thread: prio=5 tid=0x28000 nid=0x1 runnable
> #
> Abort
>
> The "truss" program indicates the crash was due to fault #6
> (FLTBOUNDS, MEMORY BOUNDS (invalid address)) and signal #11.
>
> I have tried various ways to re-compile perl with Sun's cc or gcc,
> with or without "usethreads", "useithreads", use perl5's memmory
> allocation or not, use perl's perlmain.c or miniperlmain.c, etc.
> without luck.
>
> I also tried JPerl; it does not work with Java 1.3 either but it does
> work with Java 1.1.  JPL is not what I want therefore I did not try it
> (The doc of JPL also indicates it works with Java 1.1.)
>
> I heard there are some changes in JNI between Java 1.1 and 1.2.  May
> be it is because of these changes?  If so, what are they?  How to fix
> it?
>
> Any hints or recommendations?  Please email to [EMAIL PROTECTED]
> directly.  I will summarize if there is sufficient interest.
>
> Thanks.
>
> Kong
> [EMAIL PROTECTED]
>                   
> ------- End of forwarded message -------
>
>
> _______________________________________________________________
> http://www.SINA.com - #1 Destination Site for Chinese Worldwide
>                   
> ------- End of forwarded message -------
>
>
> _______________________________________________________________
> http://www.SINA.com - #1 Destination Site for Chinese Worldwide
>

Reply via email to