Mercurial > hg > release > icedtea6-1.5
changeset 1438:d2194a80a7b6
2009-03-13 Omair Majid <omajid@redhat.com>
* patches/icedtea-xml-encodinginfo.patch: Added a jtreg test for this bug.
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Fri, 13 Mar 2009 16:30:29 -0400 |
parents | 36bef6593176 |
children | ebdc89c68af2 |
files | ChangeLog patches/icedtea-xml-encodinginfo.patch |
diffstat | 2 files changed, 65 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Mar 13 12:09:01 2009 -0400 +++ b/ChangeLog Fri Mar 13 16:30:29 2009 -0400 @@ -1,3 +1,7 @@ +2009-03-13 Omair Majid <omajid@redhat.com> + + * patches/icedtea-xml-encodinginfo.patch: Added a jtreg test for this bug. + 2009-03-13 Omair Majid <omajid@redhat.com> * Makefile.am (check-jdk): Add an exclude list.
--- a/patches/icedtea-xml-encodinginfo.patch Fri Mar 13 12:09:01 2009 -0400 +++ b/patches/icedtea-xml-encodinginfo.patch Fri Mar 13 16:30:29 2009 -0400 @@ -16,3 +16,64 @@ m_encoding = encoding; +--- /dev/null 2009-03-12 10:05:36.797002285 -0400 ++++ openjdk/jdk/test/com/sun/org/apache/xml/internal/serializer/XMLStackOverflowBug.java 2009-03-13 16:10:05.000000000 -0400 +@@ -0,0 +1,58 @@ ++/* ++ * Copyright 2009 Red Hat, Inc. All Rights Reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++ * CA 95054 USA or visit www.sun.com if you need additional information or ++ * have any questions. ++ */ ++ ++/* ++ * @test ++ * @summary Check that the xml encoder doesnt cause a StackOverflowError ++ * ++ */ ++ ++import java.io.IOException; ++ ++import javax.xml.transform.TransformerConfigurationException; ++import javax.xml.transform.TransformerFactory; ++import javax.xml.transform.sax.SAXTransformerFactory; ++import javax.xml.transform.sax.TransformerHandler; ++import javax.xml.transform.stream.StreamResult; ++ ++import org.xml.sax.SAXException; ++ ++public class XMLStackOverflowBug { ++ ++ public static void main(String[] args) ++ throws TransformerConfigurationException, IOException, SAXException { ++ ++ SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory ++ .newInstance(); ++ TransformerHandler ser = stf.newTransformerHandler(); ++ ser.setResult(new StreamResult(System.out)); ++ ++ StringBuilder sb = new StringBuilder(4096); ++ for (int x = 4096; x > 0; x--) { ++ sb.append((char)x); ++ } ++ ser.characters(sb.toString().toCharArray(), 0, sb.toString().toCharArray().length); ++ ser.endDocument(); ++ } ++} ++