From owner-svn-src-stable-9@FreeBSD.ORG Sun Mar 1 00:47:39 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 174BB2E6; Sun, 1 Mar 2015 00:47:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC33D260; Sun, 1 Mar 2015 00:47:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t210lcHl095258; Sun, 1 Mar 2015 00:47:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t210lcuH095256; Sun, 1 Mar 2015 00:47:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503010047.t210lcuH095256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Mar 2015 00:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279456 - in stable: 10/contrib/libcxxrt 9/contrib/libcxxrt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 00:47:39 -0000 Author: dim Date: Sun Mar 1 00:47:37 2015 New Revision: 279456 URL: https://svnweb.freebsd.org/changeset/base/279456 Log: MFC r279307: Make libcxxrt's parsing of DWARF exception handling tables work on architectures with strict alignment, by using memcpy() instead of directly reading fields. Reported by: Daisuke Aoyama Reviewed by: imp, bapt Tested by: bapt Differential Revision: https://reviews.freebsd.org/D1967 MFC r279310: Since newer versions of compiler-rt require unwind.h, and we want to use the copy in libcxxrt for it, fix the arm-specific header to define the _Unwind_Action type. Submitted by: andrew Modified: stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/unwind-arm.h Directory Properties: stable/9/contrib/libcxxrt/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/unwind-arm.h Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/9/contrib/libcxxrt/dwarf_eh.h Sun Mar 1 00:44:15 2015 (r279455) +++ stable/9/contrib/libcxxrt/dwarf_eh.h Sun Mar 1 00:47:37 2015 (r279456) @@ -218,15 +218,17 @@ static int64_t read_sleb128(dw_eh_ptr_t static uint64_t read_value(char encoding, dw_eh_ptr_t *data) { enum dwarf_data_encoding type = get_encoding(encoding); - uint64_t v; switch (type) { // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = static_cast(*reinterpret_cast(*data));\ - *data += sizeof(type);\ - break; + {\ + type t;\ + memcpy(&t, *data, sizeof t);\ + *data += sizeof t;\ + return static_cast(t);\ + } READ(DW_EH_PE_udata2, uint16_t) READ(DW_EH_PE_udata4, uint32_t) READ(DW_EH_PE_udata8, uint64_t) @@ -237,15 +239,11 @@ static uint64_t read_value(char encoding #undef READ // Read variable-length types case DW_EH_PE_sleb128: - v = read_sleb128(data); - break; + return read_sleb128(data); case DW_EH_PE_uleb128: - v = read_uleb128(data); - break; + return read_uleb128(data); default: abort(); } - - return v; } /** Modified: stable/9/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind-arm.h Sun Mar 1 00:44:15 2015 (r279455) +++ stable/9/contrib/libcxxrt/unwind-arm.h Sun Mar 1 00:47:37 2015 (r279456) @@ -36,6 +36,8 @@ _URC_FATAL_PHASE1_ERROR = _URC_FAILURE } _Unwind_Reason_Code; +typedef int _Unwind_Action; + typedef uint32_t _Unwind_State; #ifdef __clang__ static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0;