This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: [Patch] PR java/22113: Fix buffer overflow in Java lexer for FP literals


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/


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