bug submission problem / solaris segfault

2000-01-14 Thread Mike Linksvayer


Hi, I tried to submit a bug and got the following error (bug
description is at the end of the message)



- Forwarded message from Mail Delivery Subsystem 
<[EMAIL PROTECTED]> -

X-Envelope-To: <[EMAIL PROTECTED]>
Date: Fri, 14 Jan 2000 17:10:34 -0800
From: Mail Delivery Subsystem <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Returned mail: User unknown
Auto-Submitted: auto-generated (failure)

The original message was received at Fri, 14 Jan 2000 17:10:32 -0800
from [EMAIL PROTECTED] [209.41.108.10]

   - The following addresses had permanent fatal errors -
[EMAIL PROTECTED]
(expanded from: <[EMAIL PROTECTED]>)

   - Transcript of session follows -
... while talking to kaffe.novare.net.:
>>> RCPT To:<[EMAIL PROTECTED]>
<<< 550 <[EMAIL PROTECTED]>... Relaying denied
550 [EMAIL PROTECTED] User unknown

Reporting-MTA: dns; www.transvirtual.com
Received-From-MTA: DNS; mail.brainfood.com
Arrival-Date: Fri, 14 Jan 2000 17:10:32 -0800

Final-Recipient: RFC822; <[EMAIL PROTECTED]>
X-Actual-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.1.1
Remote-MTA: DNS; kaffe.novare.net
Diagnostic-Code: SMTP; 550 <[EMAIL PROTECTED]>... Relaying denied
Last-Attempt-Date: Fri, 14 Jan 2000 17:10:34 -0800

Return-Path: <[EMAIL PROTECTED]>
Received: from brainfood.com ([EMAIL PROTECTED] [209.41.108.10])
by www.transvirtual.com (8.8.8/8.8.8) with ESMTP id RAA17336
for <[EMAIL PROTECTED]>; Fri, 14 Jan 2000 17:10:32 -0800
From: [EMAIL PROTECTED]
Received: from dallas-ms-000.novare.net ([EMAIL PROTECTED] 
[209.41.108.100] (may be forged))
by brainfood.com (8.9.3/8.9.3/Debian/0wns/U) with ESMTP id RAA19282
for <[EMAIL PROTECTED]>; Fri, 14 Jan 2000 17:52:58 -0600
Received: from localhost (kaffe@localhost [127.0.0.1])
by dallas-ms-000.novare.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id RAA23914
for <[EMAIL PROTECTED]>; Fri, 14 Jan 2000 17:52:57 -0600
Date: Fri, 14 Jan 2000 17:52:57 -0600
Message-Id: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: SIGSEGV on Solaris 2.6 at mem/gc-mem.c:338

Full_Name: Mike Linksvayer
Version: from cvs 2000.01.14
OS: Solaris 2.6
Submission from: (NULL) (209.24.252.97)


With gcc version 2.95.1 on Solaris 2.6
make
make install
kaffe foo (doesn't matter if foo exists or not):

(gdb) run
Starting program: /home/ml/opt/libexec/Kaffe foo

Program received signal SIGSEGV, Segmentation fault.
gc_heap_malloc (sz=28) at mem/gc-mem.c:338
338 blk->free = mem->next;
(gdb) bt
#0  gc_heap_malloc (sz=28) at mem/gc-mem.c:338
#1  0x6ff42a74 in gcMalloc (gcif=0x6ff9211c, size=20, fidx=0)
at mem/gc-incremental.c:825
#2  0x6ff534f0 in newObjectChecked (class=0xa0788, info=0xefffead8)
at object.c:51
#3  0x6ff58270 in stringCharArray2Java (data=0xd6fd8, len=1264) at string.c:386
#4  0x6ff57d90 in utf8Const2JavaReplace (utf8=0xd6010, from_ch=0, to_ch=0)
at string.c:183
#5  0x6ff57ce8 in utf8Const2Java (utf8=0xd6010) at string.c:141
#6  0x6ff38408 in resolveStaticFields (class=0xa0c08, einfo=0xefffef20)
at classMethod.c:1414
#7  0x6ff36bfc in processClass (class=0xa0c08, tostate=5, einfo=0xefffef20)
at classMethod.c:224
#8  0x6ff37d28 in loadStaticClass (class=0x6ff94b94, 
name=0x6ff77578 "java/lang/Character") at classMethod.c:1087
#9  0x6ff36788 in initBaseClasses () at baseClasses.c:207
#10 0x6ff365e0 in initialiseKaffe () at baseClasses.c:154
#11 0x6ff475d0 in JNI_CreateJavaVM (vm=0x22b2c, env=0x229e4, args=0x22990)
at jni.c:165
#12 0x11070 in main (argc=1, argv=0xe1dc) at main.c:113
(gdb) 



- End forwarded message -

-- 
  See From: and Organization: above.



Re: File.getAbsolutePath() bugfix

2000-01-14 Thread Mike Linksvayer


On Thu, Jan 13, 2000 at 02:37:13PM -0500, Mike Linksvayer wrote:
> Argh, please unfix.  I'm an idiot ... the behavior of getAbsolutePath()
> is correct, only getCanonicalPath() is incorrect.  I'll post a real
> fix tonight, after I've tested more thoroughly.

It happens that getCanonicalPath was fixed on January 4.  Luck
would have it that I was working with code I retreived on January
3.  I had assumed that cvs diff would give me differences between
the head revision and my file, but apparently it gives the differences
between the revision I have checked out and my file ... I haven't
used cvs in two years. :(

Now I've encountered another problem:  Process.destroy() causes
kaffe to exit without a stack trace and without a core file.  The
following simple program never prints "destroyed" on my system
(Debian 2.1, kernel 2.2.1, gcc 2.7.2.3).

public class destroy {
public static void main(String[] args) {
try {
System.err.println("starting process");
Process p = Runtime.getRuntime().exec("sleep 5");
System.err.println("started process, destroying");
p.destroy();
System.err.println("destroyed process");
} catch (Throwable t) { t.printStackTrace(); }
}
}

I haven't tried running in gdb yet.

Another question:  Is it safe to use gcc 2.95?
http://www.kaffe.org/trouble.html says egcs is not ok, but that's
dated 4/99, and I've read about experimental gcj support which
obviously would require egcs.  I ask because I've tried very briefly
to compile and run kaffe on Solaris and Suse systems and egcs with
bad results.

-- 
  See From: and Organization: above.



Re: File.getAbsolutePath() bugfix

2000-01-13 Thread Mike Linksvayer


> Thanks, fixed!

Argh, please unfix.  I'm an idiot ... the behavior of getAbsolutePath()
is correct, only getCanonicalPath() is incorrect.  I'll post a real
fix tonight, after I've tested more thoroughly.

I must learn not to:
* think code is finished before writing unit tests
* think code is fixed if it fixes my particular problem
* watch over a locksmith fixing my front door while debugging (really)

Sorry about that.

-- 
  See From: and Organization: above.



File.getAbsolutePath() bugfix

2000-01-13 Thread Mike Linksvayer


File.getAbsolutePath() was not stripping out extra "." path
components, which is contrary to the behavior of the JDK, and
breaks user code that relies on the JDK behavior.  getCanonicalPath()
was also broken was a result.

The following code produces a simple case:

System.err.println(new File(".").getAbsolutePath());

If current directory is /foo, output under the JDK is "/foo", output
under Kaffe is "/foo/.".

I've included a simple patch below, and I'll look into a regression
test soon.


Index: java/io/File.java
===
RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/io/File.java,v
retrieving revision 1.21
diff -u -r1.21 File.java
--- java/io/File.java   1999/10/12 19:05:45 1.21
+++ java/io/File.java   2000/01/13 18:05:35
@@ -156,7 +156,15 @@
return getPath();
}
else {
-   return System.getProperty("user.dir") + separatorChar + getPath(
);
+   String path = getPath();
+   String userDir = System.getProperty("user.dir");
+   if (path.equals(".")) {
+   return userDir;
+   }
+   if (path.startsWith("./")) {
+   path = path.substring(2);
+   }
+   return userDir + separatorChar + path;
}
 }
 

-- 
  See From: and Organization: above.