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] 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.



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