Alexandr Miloslavskiy <alexandr.miloslavskiy {_AT_} syntevo.com>


Patch Review
r1898633 r1880886

r1880886 | hartmannathan | 2020-08-16 04:39:55 +0000 (Sun, 16 Aug 2020)

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


r1898633 | jamessan | 2022-03-05 20:29:42 +0000 (Sat, 05 Mar 2022)

Fix sporadic testCrash_RequestChannel_nativeRead_AfterException failure

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (testCrash_RequestChannel_nativeRead_AfterException): Ignore IOException to
    avoid a false positive test failure if WAIT_TUNNEL tries to read after the
    pipe is already closed.

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