Author: svn-role Date: Sat Aug 22 04:00:09 2020 New Revision: 1881074 URL: http://svn.apache.org/viewvc?rev=1881074&view=rev Log: Merge r1880886 from trunk:
* r1880886 Fix crash in JavaHL JNI wrapper caused by object lifetimes Justification: Fixes a crash encountered with GCC 10. Votes: +1: hartmannathan, jamessan Modified: subversion/branches/1.10.x/ (props changed) subversion/branches/1.10.x/STATUS subversion/branches/1.10.x/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp Propchange: subversion/branches/1.10.x/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1880886 Modified: subversion/branches/1.10.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/STATUS?rev=1881074&r1=1881073&r2=1881074&view=diff ============================================================================== --- subversion/branches/1.10.x/STATUS (original) +++ subversion/branches/1.10.x/STATUS Sat Aug 22 04:00:09 2020 @@ -95,11 +95,3 @@ Veto-blocked changes: Approved changes: ================= - - * r1880886 - Fix crash in JavaHL JNI wrapper caused by object lifetimes - Justification: - Fixes a crash encountered with GCC 10. - Votes: - +1: hartmannathan, jamessan - Modified: subversion/branches/1.10.x/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp?rev=1881074&r1=1881073&r2=1881074&view=diff ============================================================================== --- subversion/branches/1.10.x/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp (original) +++ subversion/branches/1.10.x/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp Sat Aug 22 04:00:09 2020 @@ -144,7 +144,8 @@ protected: { const jstring jkey = jstring(m_env.CallObjectMethod(m_jthis, impl().m_mid_get_key)); - const String::Contents key(String(m_env, jkey)); + const String str(m_env, jkey); + const String::Contents key(str); return std::string(key.c_str()); }