Date: Thu, 19 May 2016 13:40:18 +0000 From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 209599] SIGSEGV in regression test suite on java/openjdk8 Message-ID: <bug-209599-8522-eeJzLWzimX@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-209599-8522@https.bugs.freebsd.org/bugzilla/> References: <bug-209599-8522@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209599 --- Comment #7 from Andrew Smith <iamasmith.home@gmail.com> --- turning off PCH makes no difference, the fault still occurs. Interestingly with slow debug only the MappedByteBuffer.Truncate test throws the exception. Looking at the disassembly of the region of code... 0x0000000802a01f8b <Unsafe_GetNativeByte+347>: callq 0x801f04550 <_ZN10JavaThread7currentEv> 0x0000000802a01f90 <Unsafe_GetNativeByte+352>: mov $0x1,%esi 0x0000000802a01f95 <Unsafe_GetNativeByte+357>: mov %rax,-0x60(%rbp) 0x0000000802a01f99 <Unsafe_GetNativeByte+361>: mov -0x60(%rbp),%rdi 0x0000000802a01f9d <Unsafe_GetNativeByte+365>: callq 0x802a09fe0 <_ZN10JavaThread23set_doing_unsafe_accessEb> 0x0000000802a01fa2 <Unsafe_GetNativeByte+370>: mov $0x0,%esi 0x0000000802a01fa7 <Unsafe_GetNativeByte+375>: mov -0x58(%rbp),%rax 0x0000000802a01fab <Unsafe_GetNativeByte+379>: mov (%rax),%cl = # SIGSEGV is HERE 0x0000000802a01fad <Unsafe_GetNativeByte+381>: mov %cl,-0x61(%rbp) 0x0000000802a01fb0 <Unsafe_GetNativeByte+384>: mov -0x60(%rbp),%rdi 0x0000000802a01fb4 <Unsafe_GetNativeByte+388>: callq 0x802a09fe0 <_ZN10JavaThread23set_doing_unsafe_accessEb> 0x0000000802a01fb9 <Unsafe_GetNativeByte+393>: lea -0x48(%rbp),%rdi 0x0000000802a01fbd <Unsafe_GetNativeByte+397>: mov -0x61(%rbp),%cl This pretty much maps to here in unsafe.cpp #define DEFINE_GETSETNATIVE(java_type, Type, native_type) \ \ UNSAFE_ENTRY(java_type, Unsafe_GetNative##Type(JNIEnv *env, jobject unsafe, jlong addr)) \ UnsafeWrapper("Unsafe_GetNative"#Type); \ void* p =3D addr_from_java(addr); \ JavaThread* t =3D JavaThread::current(); \ t->set_doing_unsafe_access(true); \ java_type x =3D *(volatile native_type*)p; \ # So, here in our macro t->set_doing_unsafe_access(false); \ return x; \ UNSAFE_END \ \ UNSAFE_ENTRY(void, Unsafe_SetNative##Type(JNIEnv *env, jobject unsafe, jlong addr, java_type x)) \ UnsafeWrapper("Unsafe_SetNative"#Type); \ JavaThread* t =3D JavaThread::current(); \ t->set_doing_unsafe_access(true); \ void* p =3D addr_from_java(addr); \ *(volatile native_type*)p =3D x; \ t->set_doing_unsafe_access(false); \ UNSAFE_END \ \ // END DEFINE_GETSETNATIVE. DEFINE_GETSETNATIVE(jbyte, Byte, signed char) DEFINE_GETSETNATIVE(jshort, Short, signed short); DEFINE_GETSETNATIVE(jchar, Char, unsigned short); DEFINE_GETSETNATIVE(jint, Int, jint); // no long -- handled specially DEFINE_GETSETNATIVE(jfloat, Float, float); DEFINE_GETSETNATIVE(jdouble, Double, double); As far as I can see this looks OK and I suspect this is more about the call= er than this particular function. Unfortunately from frame 11 onwards we look to be in the murky region of hotspot compiled code and gdb is isn't really much help following that piec= e. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209599-8522-eeJzLWzimX>