/[Apache-SVN]
ViewVC logotype

Revision 1880886


Jump to revision: Previous Next
Author: hartmannathan
Date: Sun Aug 16 04:39:55 2020 UTC (3 years, 7 months ago)
Changed paths: 1
Log Message:
Fix crash in JavaHL JNI wrapper caused by object lifetimes

See dev@ email thread "JNI segfault while running Java tests" started
2020/08/08, archived at:

https://lists.apache.org/thread.html/rff3fa5ea97267adf36cc9daa3be01392e53fbc8050a91df4bbac01d8%40%3Cdev.subversion.apache.org%3E
https://svn.haxx.se/dev/archive-2020-08/0010.shtml

* subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp
  (Java::BaseImmutableMap::Entry::key): As the locally-scoped String::Contents
    object keeps a reference to a String, ensure the String will remain in
    scope for the lifetime of the String::Contents object by instantiating it
    as a local variable.

Reported by: jamessan

Patch by: Daniel Sahlberg <daniel.l.sahlberg {_AT_} gmail.com>

Reviewed by: Alexandr Miloslavskiy <alexandr.miloslavskiy {_AT_} syntevo.com>
             hartmannathan

Tested by: jamessan


Changed paths

Path Details
Directorysubversion/trunk/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26