public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/6217: ResourceBundle getBundle seg-faults while reading a "zipped" jar file.
@ 2002-04-07 11:16 awk
  0 siblings, 0 replies; only message in thread
From: awk @ 2002-04-07 11:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6217
>Category:       libgcj
>Synopsis:       java.util.ResourceBundle.getBundle seg-faults while reading a "zipped" jar file.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 07 11:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tony Knaus
>Release:        3.1 20020406 (prerelease)
>Organization:
Spinnaker Networks
>Environment:
System: Linux build5 2.4.9-12 #1 Tue Oct 30 18:33:49 EST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --host=i686-pc-linux-gnu --prefix=/spin/awk/compilers/gcc-3.1-hol --enable-shared --enable-threads=posix --enable-languages=c,c++,java --enable-version-specific-runtime-libs : (reconfigured) 
>Description:
java.util.ResourceBundle.getBundle seg-faults while reading a "zipped" jar file.

% /home/awk/bin/gdb5.2 TestResource
GNU gdb 2002-01-12-cvs
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run org/apache/jasper/resources/messages
Starting program: /home/awk/src/java/TestResource org/apache/jasper/resources/messages
[New Thread 1024 (LWP 24024)]
[New Thread 2049 (LWP 24033)]
[New Thread 1026 (LWP 24034)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 24024)]
0x403f1c0f in huft_build (b=0x80b0b80, n=274, s=257, d=0x404bf3a0, e=0x404bf420, t=0xbffff380, m=0x80b1018, hp=0x80c49c0, hn=0xbffff318, 
    v=0x80b1018) at ../../../gcc/zlib/inftrees.c:187
187           v[x[j]++] = i;
(gdb) bt
#0  0x403f1c0f in huft_build (b=0x80b0b80, n=274, s=257, d=0x404bf3a0, e=0x404bf420, t=0xbffff380, m=0x80b1018, hp=0x80c49c0, hn=0xbffff318, 
    v=0x80b1018) at ../../../gcc/zlib/inftrees.c:187
#1  0x403f2217 in inflate_trees_dynamic (nl=274, nd=2161028184, c=0x80b0b80, bl=0xbffff388, bd=0xbffff384, tl=0x80ceac58, td=0x80ceac58, 
    hp=0x80c49c0, z=0x80b0ac8) at ../../../gcc/zlib/inftrees.c:340
#2  0x403efd63 in inflate_blocks (s=0x80b0b28, z=0x80b0ac8, r=0) at ../../../gcc/zlib/infblock.c:315
#3  0x403f1633 in inflate (z=0x80b0ac8, f=2) at ../../../gcc/zlib/inflate.c:221
#4  0x4025327e in java::util::zip::Inflater::inflate(JArray<char>*, int, int) (this=0x80ba700, buf=0x80b0b08, off=134977832, len=2048)
    at ../../../gcc/libjava/java/util/zip/natInflater.cc:107
#5  0x40359ce9 in java.util.zip.InflaterInputStream.read(byte[], int, int) (this=0x80b9928, buf=0x80ceac58, off=-2133939112, len=-2133939112)
    at ../../../gcc/libjava/java/util/zip/InflaterInputStream.java:100
#6  0x40273979 in java.io.FilterInputStream.read(byte[], int, int) (this=0x80ceac58, buf=0x80ceac58, offset=-2133939112, len=-2133939112)
    at ../../../gcc/libjava/java/io/FilterInputStream.java:230
#7  0x4026aa6f in java.io.BufferedInputStream.refill() (this=0x80b0b08) at ../../../gcc/libjava/java/io/BufferedInputStream.java:352
#8  0x402746b8 in java.io.InputStreamReader.refill() (this=0x8093d00) at ../../../gcc/libjava/java/io/InputStreamReader.java:167
#9  0x40274384 in java.io.InputStreamReader.read(char[], int, int) (this=0x8093d00, buf=0x80ceac58, offset=-2133939112, length=8192)
    at ../../../gcc/libjava/java/io/InputStreamReader.java:106
#10 0x4026b4aa in java.io.BufferedReader.read() (this=0x8093d00) at ../../../gcc/libjava/java/io/BufferedReader.java:351
#11 0x4026b692 in java.io.BufferedReader.readLine() (this=0x8093d00) at ../../../gcc/libjava/java/io/BufferedReader.java:441
#12 0x402afe18 in java.util.Properties.load(java.io.InputStream) (this=0x809cc80, inStream=0x80ceac58)
    at ../../../gcc/libjava/java/util/Properties.java:148
#13 0x402b2447 in java.util.PropertyResourceBundle.PropertyResourceBundle(java.io.InputStream) (this=0x80ba6f0, stream=0x80ceac58)
    at ../../../gcc/libjava/java/util/PropertyResourceBundle.java:116
#14 0x402b3d34 in java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader) (baseName=0x80baf00, 
    locale=0x8098dc8, classLoader=0x0) at ../../../gcc/libjava/java/util/ResourceBundle.java:284
#15 0x402b3672 in java.util.ResourceBundle.getBundle(java.lang.String) (baseName=0x80b1018)
    at ../../../gcc/libjava/java/util/ResourceBundle.java:206
#16 0x08048f0c in TestResource.main(java.lang.String[]) (args=0x806ffc0) at TestResource.java:17
#17 0x4023e7b8 in gnu::gcj::runtime::FirstThread::call_main() (this=0x80befc0) at ../../../gcc/libjava/gnu/gcj/runtime/natFirstThread.cc:46
#18 0x402c9a88 in gnu.gcj.runtime.FirstThread.run() (this=0x80befc0) at ../../../gcc/libjava/gnu/gcj/runtime/FirstThread.java:54
#19 0x4024b5ac in _Jv_ThreadRun(java::lang::Thread*) (thread=0x80befc0) at ../../../gcc/libjava/java/lang/natThread.cc:285
#20 0x40225e24 in _Jv_RunMain(java::lang::Class*, char const*, int, char const**, bool) (klass=0x804a260, name=0x0, argc=135000000, 
    argv=0xbffff834, is_jar=false) at ../../../gcc/libjava/prims.cc:1010
#21 0x40225f5d in JvRunMain (klass=0x80ceac58, argc=-2133939112, argv=0x80ceac58) at ../../../gcc/libjava/prims.cc:1020
#22 0x08048e74 in main (argc=2, argv=0xbffff834) at /tmp/cc2Zo6cU.i:11
#23 0x4069d627 in __libc_start_main (main=0x8048e40 <main>, argc=2, ubp_av=0xbffff834, init=0x8048b88 <_init>, fini=0x80490a0 <_fini>, 
    rtld_fini=0x4000dcc4 <_dl_fini>, stack_end=0xbffff82c) at ../sysdeps/generic/libc-start.c:129
(gdb) quit

>How-To-Repeat:
Running the following test class with the following resource file
packed into a jar file using gcj jar with zip compression.

----------------------------------------------------------------
import java.util.ResourceBundle;

public class TestResource {

    public static void main(String[] args) {

        if (args.length == 0) {
            System.out.println("usage: testResource <resource bundle>");
            System.exit(0);
        }


        String rname = args[0];

        ResourceBundle bundle = ResourceBundle.getBundle(rname);
        String str = new String("");
        try {
            str = bundle.getString("jsp.error.bad.servlet.engine");
        } catch(Exception ex) {
            System.out.println(" unable to find string ");
            System.exit(-1);
        }
        System.out.println("str= " + str);
    }
};

----------------------------------------------------------------
#
# $Id: messages.properties,v 1.17.2.6 2000/11/06 04:08:15 larryi Exp $
# 
# Default localized string information
# Localized this the Default Locale as is en_US

jsp.error.bad.servlet.engine=Incorrect servlet engine version!
jsp.error.no.scratch.dir=The JSP engine is not configured with a scratch dir.\
\n Please add \"jsp.initparams=scratchdir=<dir-name>\" \
\n in the servlets.properties file for this context.
jsp.error.bad.scratch.dir=The scratchDir you specified: {0} is unusable.
jsp.message.scratch.dir.is=Scratch dir for the JSP engine is: {0}
jsp.message.parent_class_loader_is=Parent class loader is: {0}
jsp.message.dont.modify.servlets=IMPORTANT: Do not modify the generated servlets
jsp.error.not.impl.comments=Internal error: Comments not implemented
jsp.error.not.impl.directives=Internal error: Directives not implemented
jsp.error.not.impl.declarations=Internal error: Declarations not implemented
jsp.error.not.impl.expressions=Internal error: Expressions not implemented
jsp.error.not.impl.scriptlets=Internal error: Scriptlets not implemented
jsp.error.not.impl.usebean=Internal error: useBean not implemented

----------------------------------------------------------------
% jar tvf jasper-properties.jar
     0 Sun Apr 07 13:58:08 EDT 2002 META-INF/
    45 Sun Apr 07 13:58:08 EDT 2002 META-INF/MANIFEST.MF
     0 Sun Apr 07 13:55:30 EDT 2002 org/
     0 Sun Apr 07 13:55:30 EDT 2002 org/apache/
     0 Sun Apr 07 13:55:30 EDT 2002 org/apache/jasper/
     0 Sun Apr 07 13:57:56 EDT 2002 org/apache/jasper/resources/
  1130 Sun Apr 07 13:56:04 EDT 2002 org/apache/jasper/resources/messages.properties
%


>Fix:
Until a fix is available this seg-fault can be avoided by turning off zip
compression by giving the '0' option to jar program.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-07 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-07 11:16 libgcj/6217: ResourceBundle getBundle seg-faults while reading a "zipped" jar file awk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).