This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch] natString.cc: Some fixes for bounds checkingarithmetic.
- From: Ralph Loader <suckfish at ihug dot co dot nz>
- To: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- Cc: java-patches at gcc dot gnu dot org
- Date: Wed, 24 Sep 2003 08:40:47 +1200
- Subject: Re: [Patch] natString.cc: Some fixes for bounds checkingarithmetic.
- References: <6545517A-EDB2-11D7-A799-003065F97F7C@mckinlay.net.nz>
> > Alternatively, I could fix those without test cases. Would that be
> > acceptable?
>
> If you need a 4 GB string to break it, then I'd be inclined to ignore
> it as an extremely pessimistic case!
For stuff in .cc files, it's possible to corrupt the runtime - I'd feel
uncomfortable not fixing it because we might end up on bugtraq.
For stuff in .java, it mostly just changes the exception that gets
thrown, so ignoring it is probably OK. (Although we might also leave
objects in an inconsistent state).
There might be issues outside of string handling too - a 4GB string
would be pretty odd, but a 4GB array of floats is not unheard of.
Ralph.
> However, it doesn't hurt to be
> correct and if the changes don't add significant overhead or complexity
> then they should be fine. Its up to you.
>
> Regards
>
> Bryce.
>
>