This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch] Overflows in array allocation.
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: Ralph Loader <suckfish at ihug dot co dot nz>
- Cc: java-patches at gcc dot gnu dot org
- Date: Thu, 25 Sep 2003 12:07:34 +1200
- Subject: Re: [Patch] Overflows in array allocation.
On Wednesday, Sep 24, 2003, at 16:37 Pacific/Auckland, Ralph Loader
wrote:
The two array allocation functions in prims.cc have overflow problems.
Hi Ralph,
FYI all these patches so far are accepted, pending the copyright
assignment documentation.
A better fix might be change the allocation functions to take size_t
rather than jint / jsize. That would change quite a few places, and
I'm
not sure if / what requirements there are not to change the ABI of the
functions & objects involved. I can do this if it's wanted.
For the internal allocation functions (ie where the argument is in
bytes), we should probably change to size_t, especially if it makes
things cleaner. Obviously we can't change the functions that are called
directly by the compiler (where the argument is the array size), as
those are defined to be a Java int by the language spec.
Regards
Bryce.