From owner-freebsd-java@freebsd.org Fri Jan 12 21:20:07 2018 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D29C8E7CB44 for ; Fri, 12 Jan 2018 21:20:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id AF2088063B for ; Fri, 12 Jan 2018 21:20:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id AE83FE7CB41; Fri, 12 Jan 2018 21:20:07 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE33AE7CB40 for ; Fri, 12 Jan 2018 21:20:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94DF580637 for ; Fri, 12 Jan 2018 21:20:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8A1D7196C6 for ; Fri, 12 Jan 2018 21:20:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w0CLK7Va077794 for ; Fri, 12 Jan 2018 21:20:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w0CLK7JU077793 for java@FreeBSD.org; Fri, 12 Jan 2018 21:20:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 225054] java/openjdk* : fails to build with clang 6.0 (blocks 571 ports) Date: Fri, 12 Jan 2018 21:20:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: needs-patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 21:20:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225054 --- Comment #10 from Dimitry Andric --- (In reply to Dimitry Andric from comment #9) > So the address of the _hash_value field is OK, apparently. As to why this > gives a segfault, no idea yet. Actually, it is quite clear: the memory is read-only.=20 openjdk/hotspot/src/share/vm/utilities/nativeCallStack.cpp has: 28 #include "utilities/nativeCallStack.hpp" 29 30 const NativeCallStack NativeCallStack::EMPTY_STACK(0, false); 31 32 NativeCallStack::NativeCallStack(int toSkip, bool fillStack) : 33 _hash_value(0) { 34 I.e. NativeCallStack::EMPTY_STACK is const, and placed into .rodata. Then openjdk/hotspot/src/share/vm/services/memTracker.cpp has: 70 // Construct NativeCallStack::EMPTY_STACK. It may get constructed twice, 71 // but it is benign, the results are the same. 72 ::new ((void*)&NativeCallStack::EMPTY_STACK) NativeCallStack(0, false); This new invocation cannot work, because it tries to re-initialize a const object. Why this worked in previous clang, or in any other compiler, I don= 't know. :) --=20 You are receiving this mail because: You are the assignee for the bug.=