IBM Support

IV51999: STRINGBUFFER.SETLENGTH FAILS TO INITIALIZE EXTRA CHARACTERS TO \0000

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: When StringBuffer or StringBuilder setLength() is
    used to increase the length of the string the specification
    requires the additional characters to be initialized with \0000.
    Under some circumstances this was not happening, revealing the
    previous contents of memory in the newly allocated space.
    .
    Stack Trace: N/A
    .
    

Local fix

  • The problem can be avoided by using the following command line
    option which prevents the ensureCapacityImpl() methods from
    being compiled by the JIT:
    -Xjit:exclude={java/lang/StringBu*.ensureCapacityImpl(*},dontInl
    ine={java/lang/StringBu*.ensureCapacityImpl(*}
    

Problem summary

  • The problem happens when the JIT incorrectly compiles the
    ensureCapacityImpl methods which are used by setLength()
    

Problem conclusion

  • The JIT has been modified to ensure that the allocated memory is
    correctly zero initialized in all cases.
    .
    This APAR will be fixed in the following Java Releases:
       7    SR7       (7.0.7.0)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

  • The problem can be avoided by using the following command line
    option which prevents the ensureCapacityImpl() methods from
    being compiled by the JIT:
    
    -Xjit:exclude={java/lang/StringBu*.ensureCapacityImpl(*},dontInl
    ine={java/lang/StringBu*.ensureCapacityImpl(*}
    

Comments

APAR Information

  • APAR number

    IV51999

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    260

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-11-12

  • Closed date

    2015-05-12

  • Last modified date

    2015-05-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    JIT

  • Fixed component ID

    620700124

Applicable component levels

  • R260 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSC9HBA","label":"Just In Time (JIT) Compiler"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"260","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
21 May 2015