develooper Front page | perl.jpl | Postings from May 2004

Re: unexpected exception has been detected in native code outside the VM

Thread Previous | Thread Next
From:
ced
Date:
May 20, 2004 09:08
Subject:
Re: unexpected exception has been detected in native code outside the VM
Message ID:
200405201555.IAA18768@carios2.ca.boeing.com
> # java Sample
> # # An unexpected exception has been detected in native code outside the
VM.# Program counter=0xfada6da0
> #
> # Problematic Thread: prio=5 tid=0x28070 nid=0x1 runnable
> #
> Abort(coredump)
> #


> h I\264m running Perl 5.005_03 on Solaris 7 with JDK 1.3. Is there a problem wit
> these versions working together? I have attached the log from the installation
> process.~v

Newer Perl versions have a necessary core patch that'll eliminate
this problem. So, I'd absolutely recommend upgrading Perl.. and
your JDK too if you can. Afterwards look at the install Sreedhar 
just sent if there're any problems.   

If you're stuck with an antiquated Perl, here's Jarkko's old core 
patch that may work.  I don't recall if the patch targetted Perl 
version 5.5.3 however. Some things are so old they just need to
rest in peace...

hth,
--
Charles DeRykus



Would this work for you?  (Untested since I do not do JPL...)

Change 8803 by jhi@alpha on 2001/02/14 03:14:14

	Duplicate environment for JPL so that JDK 1.2/1.3 don't get upset.

Affected files ...

... //depot/perl/perl.c#300 edit
... //depot/perl/perl.h#315 edit

Differences ...

==== //depot/perl/perl.c#300 (text) ====
Index: perl/perl.c
--- perl/perl.c.~1~	Wed Feb 14 05:19:55 2001
+++ perl/perl.c	Wed Feb 14 05:19:55 2001
@@ -3257,6 +3257,8 @@
     char *s;
     SV *sv;
     GV* tmpgv;
+    char **dup_env_base = 0;
+    int dup_env_count = 0;
 
     argc--,argv++;	/* skip name of script */
     if (PL_doswitches) {
@@ -3325,6 +3327,23 @@
 	    env = environ;
 	if (env != environ)
 	    environ[0] = Nullch;
+#ifdef NEED_ENVIRON_DUP_FOR_MODIFY
+	{
+	    char **env_base;
+	    for (env_base = env; *env; env++) 
+		dup_env_count++;
+	    if ((dup_env_base = (char **)
+		 safemalloc( sizeof(char *) * (dup_env_count+1) ))) {
+		char **dup_env;
+		for (env = env_base, dup_env = dup_env_base;
+		     *env;
+		     env++, dup_env++)
+		    *dup_env = savepv(*env);
+		*dup_env = Nullch;
+		env = dup_env_base;
+	    } /* else what? */
+	}
+#endif /* NEED_ENVIRON_DUP_FOR_MODIFY */
 	for (; *env; env++) {
 	    if (!(s = strchr(*env,'=')))
 		continue;
@@ -3340,7 +3359,13 @@
 	    (void)PerlEnv_putenv(savepv(*env));
 #endif
 	}
-#endif
+	if (dup_env_base) {
+	    char **dup_env;
+	    for (dup_env = dup_env_base; *dup_env; dup_env++)
+		Safefree(*dup_env);
+	    Safefree(dup_env_base);
+	}
+#endif /* USE_ENVIRON_ARRAY */
 #ifdef DYNAMIC_ENV_FETCH
 	HvNAME(hv) = savepv(ENV_HV_NAME);
 #endif

==== //depot/perl/perl.h#315 (text) ====
Index: perl/perl.h
--- perl/perl.h.~1~	Wed Feb 14 05:19:55 2001
+++ perl/perl.h	Wed Feb 14 05:19:55 2001
@@ -1692,6 +1692,13 @@
 #  define USE_ENVIRON_ARRAY
 #endif
 
+#ifdef JPL
+    /* E.g. JPL needs to operate on a copy of the real environment.
+     * JDK 1.2 and 1.3 seem to get upset if the original environment
+     * is diddled with. */
+#   define NEED_ENVIRON_DUP_FOR_MODIFY
+#endif
+
 #ifndef PERL_SYS_INIT3
 #  define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp)
 #endif
End of Patch.


-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About