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:
http://cr.openjdk.java.net/~bpittore/8005716/jdk-webrev.02/
bill
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?
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
Otherwise, I think the implementation looks good to me.
-Alan.