Request for review- RFE 8005716

BILL PITTORE bill.pittore at
Thu Mar 7 21:10:25 UTC 2013

On 3/7/2013 3:50 PM, Alan Bateman wrote:
> On 07/03/2013 16:36, BILL PITTORE wrote:
>> I updated the code based on the feedback. To fix the windows symbol 
>> name issue that Dean brought up I added a platform specific function, 
>> buildJniFunctionName. In windows it will properly convert 
>> _JNI_OnLoad at 8 to _JNI_OnLoad_libname at 8 as well as handle JNI_OnLoad 
>> symbol name.
>> Fixed copyright headers as well.
>> Tested on linux and windows
>> Webrevs are here:
>> bill 
> Thanks for sorting out the decorator issue. One comment on that part 
> of the implementation is that findJniFunction is sizing the buffer and 
> buildJniFunctionName is using strcpy in the components. I wonder if 
> this could be changed so that buildJniFunctionName sizes the buffer 
> and uses strncpy. That way it will be obviously safe when just looking 
> at one function. It makes it easier for static analysis tools to check 
> too.
I actually was passing in 'len' at one point and checking but it seemed 
redundant. The comment about static analysis tools having a fit makes 
sense. I'll tweak it as you suggest.

> -Alan

More information about the core-libs-dev mailing list