This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Java segfault in predict.c



Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:

> public class Crash
> {
>   public void checkXMLLangAttributeValue(String lang)
>   {
>       int offset = -1;
>       if (lang.length() >= 2) {
>           char ch0 = lang.charAt(0);
>       }
>       if (offset > 0) {
>           char ch = lang.charAt(offset++);
>           if (ch != '-') {
>               offset = -1;
>           } else {
>               while (true)
>           {
>                 if (ch == '-')
>                   ch = lang.charAt(offset++);
>                 ch = lang.charAt(offset++);
>               }
>           }
>       }
>   }
> }

Can you add this as a testcase?

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]