This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch] PR java/22113: Fix buffer overflow in Java lexer for FP literals
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 17 Aug 2005 00:04:45 +0530
- Subject: Re: [Patch] PR java/22113: Fix buffer overflow in Java lexer for FP literals
- References: <43022C18.6080400@gmail.com> <43022DBE.6060200@avtrex.com>
On 8/16/05, David Daney <ddaney@avtrex.com> wrote:
> Ranjit Mathew wrote:
> >
> > This is a naive but effective patch for PR java/22113 where
> > the 'literal_token' buffer of do_java_lex() in lex.c for reading
> > in an FP literal was overflowing in cases like the Jacks testcase
> > 3.10.2-round-6.
>
> What is the actual length of the longest of the tokens in question
> allowed by the JLS?
~shrug~
JLS 3.10.2 doesn't seem to specify token-length per se for FP literals:
http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.10.2
> It seems if it is unbounded, that this is not the correct fix.
> Otherwise it seems unlikely that the upper bound is exactly 256.
Perhaps. In this particular case, I just wanted to have a quick
and effective fix for this issue as it keeps showing up as spurious
FAILs on different testsuite runs.
My 2p.
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/