Opened 11 years ago

Closed 11 years ago

Last modified 11 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


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

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 11 years ago by tomfukushima

External ID: 933998
Resolution: fixed
Status: newclosed

comment:2 Changed 11 years ago by tomfukushima

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