Ticket #4762 (closed defect: fixed)

Bug contains 1 commit(s) | SVN Diffs for #4762

 

Opened 3 years ago

Memory leaks in release critical code

Reported by: tim_ellison(at)uk.ibm.com Assigned to: ram
Priority: critical Milestone: 3.6
Component: unknown Version: 3.4
Keywords: closed Cc:
Load: Xref:
Java Version: Operating System: all
Project (C/J): ICU4JNI Weeks: 0
Review: srl

Description

The ICU4JNI code version 3.4 has multiple occurrences of JNI calls to GetPrimitiveArrayCritical and ReleasePrimitiveArrayCritical (see converter/ConverterInterface.c and normalizer/NormalizationInterface.c).

ICU4JNI frequently uses release mode JNI_COMMIT alone, which is a checkpoint copy back of data to the java array and is not required to release the primitive array memory storage. On VMs that copy the data this introduces a significant memory leak.

According to JNI the mode flag for copying back the data and releasing the memory is mode 0.

(Note that on VMs that do not copy the data, the modes 0 and JNI_COMMIT are equally meaningless and therefore this leak goes undetected.)

Attachments

Change History

12/31/69 17:21:49 changed by auditor

  • Wed Sep 14 08:18:23 2005 weiv changed notes2: assign: "" to "ram", priority: "" to "critical", target: "UNSCH" to "3.6",
  • Fri Sep 16 08:05:33 2005 grhoten moved from incoming to others
  • Mon Sep 26 12:12:59 2005 ram changed notes2: review: "" to "srl",
  • Tue Jul 18 13:55:05 2006 srl moved from others to fixed
  • Sun Oct 22 07:30:53 2006 grhoten moved from fixed to closed

Add/Change #4762 (Memory leaks in release critical code)




Anti spam check: