[Patch] Overflows in array allocation.
Bryce McKinlay
bryce@mckinlay.net.nz
Thu Sep 25 07:44:00 GMT 2003
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.
More information about the Java-patches
mailing list