Ticket #5579 (closed defect: worksforme)

SVN Diffs for #5579

 

Opened 2 years ago

Last modified 3 weeks ago

possiblely a memory leak on CharsetDecoderICU

Reported by: Tony Assigned to: srl
Priority: major Milestone: 4.0
Component: conversion Version: 3.6
Keywords: Cc:
Load: Xref:
Java Version: 5.0.08 Operating System: windows xp sp2
Project (C/J): ICU4JNI Weeks:
Review:

Description (Last modified by srl)

The testcase[1] got following error:
..........................................................................java.lang.RuntimeException: U_ILLEGAL_ARGUMENT_ERROR
FAILED
	at com.ibm.icu4jni.common.ErrorCode.getException(ErrorCode.java:45)
	at com.ibm.icu4jni.charset.CharsetDecoderICU.implReplaceWith(CharsetDecoderICU.java:106)
	at java.nio.charset.CharsetDecoder.replaceWith(CharsetDecoder.java:271)
	at T.main(T.java:87)

[1]
public static void main(String[] args) {
        try { 
            for (int i = 0; i < 10000000; i++) {
                CharsetProviderICU provider = new CharsetProviderICU();
                Charset cs = provider.charsetForName("UTF-8");
                CharsetDecoder cd = cs.newDecoder();
                cd = cd.replaceWith("a");
                String str = "abc";
                cd.decode(ByteBuffer.wrap("string".getBytes("UTF-8")),
                    CharBuffer.wrap(new char[1024]), false);
                if (i % 50000 == 0) {
                    System.out.print(".");
                    System.out.flush();
                }
            }
            System.out.println("PASSED");
        } catch (Throwable e) {
            e.printStackTrace();
            System.out.println("FAILED");
        }
    }

The Charset in SUN5.0_08 does not have this problem. I consider that it caused by memory leak in somewhere.

Attachments

Change History

04/04/07 11:50:36 changed by srl

  • load changed.
  • weeks changed.
  • xref changed.
  • description changed.
  • revw changed.

04/04/07 11:52:21 changed by grhoten

  • owner changed from somebody to srl.
  • priority changed from major to minor.
  • milestone changed from UNSCH to 3.8.

06/28/07 14:42:55 changed by grhoten

  • owner changed from srl to michaelow.
  • component changed from unknown to conversion.

09/12/07 11:10:58 changed by michaelow

  • milestone changed from 3.8 to 4.0.

12/18/07 11:17:19 changed by grhoten

  • milestone changed from 4.0 to UNSCH.

Further work on ICU4JNI has been halted, and it's not a significant issue anymore. https://issues.apache.org/jira/browse/HARMONY-2739

06/13/08 13:14:10 changed by srl

  • owner changed from michaelow to srl.
  • priority changed from minor to assess.
  • milestone changed from UNSCH to 4.0.

related to #6347?

06/13/08 13:23:41 changed by srl

  • project changed from all to ICU4JNI.

07/21/08 07:54:11 changed by srl

  • priority changed from assess to major.
  • status changed from new to assigned.

Should be fixed. Verify and close.

08/07/08 11:03:44 changed by srl

  • status changed from assigned to closed.
  • resolution set to worksforme.

verified as not an issue as part of #6352


Add/Change #5579 (possiblely a memory leak on CharsetDecoderICU)




Anti spam check: