Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#457 closed defect (fixed)

SWIG string conversion for Java may not work on all JVMs

Reported by: tomfukushima Owned by:
Priority: medium Milestone: 2.0
Component: General Version: 2.0.0
Severity: major Keywords:
Cc: External ID: 933998

Description

A pitfalls page from java.sun.com indicates that JNI native strings are not null terminated.

http://java.sun.com/docs/books/jni/html/pitfalls.html

The current SWIG translation from Java to C++ assumes that they are. If this is true, the Java API should be completely unusable. However, Tomcat does seem to work just fine. Different JVMs may also behave differently.

The offending code is the autogenerated string handling going from Java -> C++. It can be easily fixed and will affect all CREFSTRING arguments in the API.

Change History (2)

comment:1 Changed 10 years ago by tomfukushima

External ID: 933998
Resolution: fixed
Status: newclosed

comment:2 Changed 10 years ago by tomfukushima

Milestone: 2.12.0
Note: See TracTickets for help on using tickets.