United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6888167 memory leaks in the medialib glue code
JDK-6888167 : memory leaks in the medialib glue code

Details
Type:
Bug
Submit Date:
2009-10-05
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2009-11-25
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports

Sub Tasks

Description
Parfait found memory leaks in the medialib glue code:

Error: Memory leak [Allocation bug dataflow] <f4da2701424a5a6df383c83c345262be>
    Leak of pointer calloc(1, 496) at lines 976, 990 and 993
       at /export/datasets/jdk-b71-cristina/jdk/make/sun/awt/../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:963 in function 'Java_sun_awt_image_ImagingLib_transformRaster'
Error: Memory leak [Allocation bug dataflow] <1d4c8c9fd21c433c08ea896b32aa9df6>
    Leak of pointer calloc(1, 496) at lines 976, 990 and 993
       at /export/datasets/jdk-b71-cristina/jdk/make/sun/awt/../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:968 in function 'Java_sun_awt_image_ImagingLib_transformRaster'
Error: Memory leak [Allocation bug dataflow] <01114ff609ecd3ea186ff8df7048b1f7>
    Leak of pointer malloc((jlen * 8))  on all paths
       at /export/datasets/jdk-b71-cristina/jdk/make/sun/awt/../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:1209 in function 'Java_sun_awt_image_ImagingLib_lookupByteBI'
Error: Memory leak [Allocation bug dataflow] <d8dcd687b59482ff3127ab95eae7ade8>
    Leak of pointer calloc(1, 496) at line 1416
       at /export/datasets/jdk-b71-cristina/jdk/make/sun/awt/../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:1408 in function 'Java_sun_awt_image_ImagingLib_lookupByteRaster'

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/java2d_data/7/6888167
                                     
2009-10-23
EVALUATION

To avoid memory leaks in the medialib glue code we
  * perform sanity checks before allocations
    (lines 967 - 971 and 987 - 995).
  * make sure that error handling blocks free
    all allocated objects (rest of changes).
                                     
2009-10-23



Hardware and Software, Engineered to Work Together