Request for review- RFE 8005716
bill.pittore at oracle.com
Mon Mar 11 15:37:01 UTC 2013
On 3/11/2013 9:40 AM, Alan Bateman wrote:
> On 08/03/2013 02:22, BILL PITTORE wrote:
>> Moved the string allocation into buildJniFunctionName as Alan
>> suggested. Built and tested on windows and linux. Updated the webrev:
> I see this updates the method descriptions to take on board Jeremy's
> comment on the possibility of the library being statically linked with
> the main executable with or without the VM. To be complete, I think
> this will require an update to the UnstatisfiedLinkError description too.
> Thanks for moving the sizing/allocation of the function name into
> buildJniFunctionName as that is cleaner and safer. Is FILENAME_MAX
> really the right limit to impose?
Maybe JVM_MAXPATHLEN is the better choice.
> A minor point, but the buffer is overrsized by 1 for the shared
> library case, I think it should be:
> len = strlen(sym) + (cname != NULL ? strlen(cname)+1 : 0) + 1
The +2 covered both cases; but re-wrote it to be the more explicit
> Otherwise, I think the implementation looks good to me.
More information about the core-libs-dev