BZ #185: CACAO spits out unsolicited finalizer exceptions

Status fields:

creation_ts:2013-06-30 10:54
component:unspecified
version:1.6.1
rep_platform:All
op_sys:All
bug_status:RESOLVED
resolution:FIXED
reporter:stefan@complang.tuwien.ac.at
For example, this, which is normally silently ignored:

$ cacao -Xmx256m -jar dacapo-2006-10-MR2.jar antlr
Exception in thread "Finalizer" java.io.IOException: invalid file descriptor
   at gnu.java.nio.VMChannel$State.close(VMChannel.java:695)
   at gnu.java.nio.VMChannel.close(VMChannel.java:625)
   at gnu.java.nio.FileChannelImpl.implCloseChannel(FileChannelImpl.java:218)
   at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChan
nel.java:80)
   at java.io.RandomAccessFile.close(RandomAccessFile.java:183)
   at java.util.zip.ZipFile.close(ZipFile.java:318)
   at java.util.zip.ZipFile.finalize(ZipFile.java:328)
===== DaCapo antlr starting =====

Comment #1 by stefan@complang.tuwien.ac.at on 2013-06-30 10:55:30

This is caused by the removal of opt_DebugFinalizer in
<http://mips.complang.tuwien.ac.at/hg/cacao/rev/5cce362cb59e>.

Comment #2 by stefan@complang.tuwien.ac.at on 2013-06-30 11:00:09

The reason seems to be that exceptions_print_stacktrace() is not filtered by the logging
framework the way that LOG(...) is.

Comment #3 by zapster@complang.tuwien.ac.at on 2013-06-30 11:42:05

The #if !defined(NDEBUG) in
http://mips.complang.tuwien.ac.at/hg/cacao/rev/5cce362cb59e#l1.62 should be changed to
if (DEBUG_COND). Unfortunately DEBUG_COND is currently broken in the staging repo. I'll
prepare a patch for this issue and create a pull request together with my DEBUG_* macro
fixes.

Comment #4 by zapster@complang.tuwien.ac.at on 2013-11-22 11:52:41

Resolved:
http://mips.complang.tuwien.ac.at/hg/cacao/rev/288603e79fc64d0a7f02a6c20b1e0f2173c1d6b6