EVALUATION
Here is a proposed fix:
--- /tmp/geta17181 2007-09-04 17:26:50.878145000 -0700
+++ UNIXProcess_md.c 2007-09-04 17:20:30.406136000 -0700
@@ -332,23 +332,31 @@
static void
throwIOException(JNIEnv *env, int errnum, const char *defaultDetail)
{
static const char * const format = "error=%d, %s";
const char *detail = defaultDetail;
char *errmsg;
+ jstring s;
+
if (errnum != 0) {
const char *s = strerror(errnum);
if (strcmp(s, "Unknown error") != 0)
detail = s;
}
/* ASCII Decimal representation uses 2.4 times as many bits as binary. */
errmsg = NEW(char, strlen(format) + strlen(detail) + 3 * sizeof(errnum));
sprintf(errmsg, format, errnum, detail);
- JNU_ThrowIOException(env, errmsg);
+ s = JNU_NewStringPlatform(env, errmsg);
+ if (s != NULL) {
+ jobject x = JNU_NewObjectByName(env, "java/io/IOException",
+ "(Ljava/lang/String;)V", s);
+ if (x != NULL)
+ (*env)->Throw(env, x);
+ }
free(errmsg);
}
#ifdef DEBUG_PROCESS
/* Debugging process code is difficult; where to write debug output? */
static void
debugPrint(char *format, ...)
|
EVALUATION
Confirmed. Caused by the fixes for
4052517: (process) Solaris Runtime.exec won't execute programs belonging to other groups
4811767: (process) Runtime.exec should throw IOException when workdir does not exist (Unix)
5033302: (process) Can't execute Solaris NFS programs with uid>64k on Linux-amd64
in 6-b81
The diagnosis is amusing. I had tested this with some ISO-8859-x locale,
and it appeared to "work", but this is because the UTF-8 decoder in hotspot falls back
to decoding using ISO-8859-1 (see UTF8::next in utf8.cpp in the hotspot sources)
|