From owner-svn-src-vendor@freebsd.org Sun Feb 12 07:04:46 2017 Return-Path: Delivered-To: svn-src-vendor@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 D4EB1CDCFDE; Sun, 12 Feb 2017 07:04:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 788C415B2; Sun, 12 Feb 2017 07:04:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1C74jRG012999; Sun, 12 Feb 2017 07:04:45 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1C74ipo012990; Sun, 12 Feb 2017 07:04:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702120704.v1C74ipo012990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 12 Feb 2017 07:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313676 - in vendor/libpcap/dist: . Win32/Include Win32/Include/arpa Win32/Include/net Win32/Prj Win32/Src bpf/net cmake config lbl missing msdos packaging pcap tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2017 07:04:46 -0000 Author: delphij Date: Sun Feb 12 07:04:44 2017 New Revision: 313676 URL: https://svnweb.freebsd.org/changeset/base/313676 Log: Vendor import of libpcap 1.8.1. Added: vendor/libpcap/dist/CMakeLists.txt (contents, props changed) vendor/libpcap/dist/GenVersion.bat vendor/libpcap/dist/Win32/Prj/wpcap.sln vendor/libpcap/dist/Win32/Prj/wpcap.vcxproj vendor/libpcap/dist/Win32/Prj/wpcap.vcxproj.filters vendor/libpcap/dist/cmake/ vendor/libpcap/dist/cmake/preconfigure.cmake vendor/libpcap/dist/cmakeconfig.h.in (contents, props changed) vendor/libpcap/dist/config/ vendor/libpcap/dist/config/have_siocglifconf.c (contents, props changed) vendor/libpcap/dist/configure.ac vendor/libpcap/dist/extract.h (contents, props changed) vendor/libpcap/dist/fad-helpers.c (contents, props changed) vendor/libpcap/dist/gen_version_c.sh (contents, props changed) vendor/libpcap/dist/gen_version_header.sh (contents, props changed) vendor/libpcap/dist/lbl/os-aix7.h (contents, props changed) vendor/libpcap/dist/missing/getopt.c (contents, props changed) vendor/libpcap/dist/missing/getopt.h (contents, props changed) vendor/libpcap/dist/missing/strtok_r.c (contents, props changed) vendor/libpcap/dist/missing/win_snprintf.c (contents, props changed) vendor/libpcap/dist/nametoaddr.h (contents, props changed) vendor/libpcap/dist/pcap-new.c (contents, props changed) vendor/libpcap/dist/pcap-rpcap.c (contents, props changed) vendor/libpcap/dist/pcap-rpcap.h (contents, props changed) vendor/libpcap/dist/pcap-tc.c (contents, props changed) vendor/libpcap/dist/pcap-tc.h (contents, props changed) vendor/libpcap/dist/pcap/can_socketcan.h (contents, props changed) vendor/libpcap/dist/pcap/dlt.h (contents, props changed) vendor/libpcap/dist/pcap/export-defs.h (contents, props changed) vendor/libpcap/dist/pcap_version.h.in (contents, props changed) vendor/libpcap/dist/portability.h (contents, props changed) vendor/libpcap/dist/remote-ext.h (contents, props changed) vendor/libpcap/dist/sockutils.c (contents, props changed) vendor/libpcap/dist/sockutils.h (contents, props changed) vendor/libpcap/dist/tests/CMakeLists.txt (contents, props changed) vendor/libpcap/dist/tests/can_set_rfmon_test.c (contents, props changed) Deleted: vendor/libpcap/dist/Win32/Include/addrinfo.h vendor/libpcap/dist/Win32/Include/arpa/ vendor/libpcap/dist/Win32/Include/bittypes.h vendor/libpcap/dist/Win32/Include/cdecl_ext.h vendor/libpcap/dist/Win32/Include/inetprivate.h vendor/libpcap/dist/Win32/Include/ip6_misc.h vendor/libpcap/dist/Win32/Include/net/netdb.h vendor/libpcap/dist/Win32/Include/net/paths.h vendor/libpcap/dist/Win32/Include/sockstorage.h vendor/libpcap/dist/Win32/Prj/libpcap.dsp vendor/libpcap/dist/Win32/Prj/libpcap.dsw vendor/libpcap/dist/Win32/Src/ vendor/libpcap/dist/configure.in vendor/libpcap/dist/fad-null.c vendor/libpcap/dist/fad-sita.c vendor/libpcap/dist/fad-win32.c vendor/libpcap/dist/packaging/ vendor/libpcap/dist/pcap-can-linux.c vendor/libpcap/dist/pcap-can-linux.h vendor/libpcap/dist/pcap-canusb-linux.c vendor/libpcap/dist/pcap-canusb-linux.h vendor/libpcap/dist/runlex.sh Modified: vendor/libpcap/dist/CHANGES vendor/libpcap/dist/CREDITS vendor/libpcap/dist/INSTALL.txt vendor/libpcap/dist/LICENSE vendor/libpcap/dist/Makefile-devel-adds vendor/libpcap/dist/Makefile.in vendor/libpcap/dist/README vendor/libpcap/dist/README.Win32 vendor/libpcap/dist/README.aix vendor/libpcap/dist/README.hpux vendor/libpcap/dist/README.linux vendor/libpcap/dist/README.septel vendor/libpcap/dist/README.sita vendor/libpcap/dist/README.tru64 vendor/libpcap/dist/TODO vendor/libpcap/dist/VERSION vendor/libpcap/dist/Win32/Include/Gnuc.h vendor/libpcap/dist/Win32/Include/net/if.h vendor/libpcap/dist/aclocal.m4 vendor/libpcap/dist/bpf/net/bpf_filter.c vendor/libpcap/dist/bpf_dump.c vendor/libpcap/dist/bpf_image.c vendor/libpcap/dist/config.guess vendor/libpcap/dist/config.h.in vendor/libpcap/dist/config.sub vendor/libpcap/dist/configure vendor/libpcap/dist/dlpisubs.c vendor/libpcap/dist/etherent.c vendor/libpcap/dist/ethertype.h vendor/libpcap/dist/fad-getad.c vendor/libpcap/dist/fad-gifc.c vendor/libpcap/dist/fad-glifc.c vendor/libpcap/dist/gencode.c vendor/libpcap/dist/gencode.h vendor/libpcap/dist/grammar.y vendor/libpcap/dist/inet.c vendor/libpcap/dist/install-sh vendor/libpcap/dist/lbl/os-osf4.h vendor/libpcap/dist/lbl/os-osf5.h vendor/libpcap/dist/lbl/os-solaris2.h vendor/libpcap/dist/lbl/os-sunos4.h vendor/libpcap/dist/lbl/os-ultrix4.h vendor/libpcap/dist/missing/snprintf.c vendor/libpcap/dist/mkdep vendor/libpcap/dist/msdos/bin2c.c vendor/libpcap/dist/msdos/common.dj vendor/libpcap/dist/msdos/makefile vendor/libpcap/dist/msdos/makefile.dj vendor/libpcap/dist/msdos/makefile.wc vendor/libpcap/dist/msdos/ndis2.c vendor/libpcap/dist/msdos/ndis2.h vendor/libpcap/dist/msdos/ndis_0.asm vendor/libpcap/dist/msdos/pkt_rx0.asm vendor/libpcap/dist/msdos/pkt_rx1.s vendor/libpcap/dist/msdos/pktdrvr.c vendor/libpcap/dist/msdos/pktdrvr.h vendor/libpcap/dist/msdos/readme.dos vendor/libpcap/dist/nametoaddr.c vendor/libpcap/dist/optimize.c vendor/libpcap/dist/pcap-bpf.c vendor/libpcap/dist/pcap-bpf.h vendor/libpcap/dist/pcap-bt-linux.c vendor/libpcap/dist/pcap-bt-linux.h vendor/libpcap/dist/pcap-bt-monitor-linux.c vendor/libpcap/dist/pcap-common.c vendor/libpcap/dist/pcap-config.1 vendor/libpcap/dist/pcap-dag.c vendor/libpcap/dist/pcap-dag.h vendor/libpcap/dist/pcap-dbus.c vendor/libpcap/dist/pcap-dlpi.c vendor/libpcap/dist/pcap-dos.c vendor/libpcap/dist/pcap-dos.h vendor/libpcap/dist/pcap-filter.manmisc.in vendor/libpcap/dist/pcap-int.h vendor/libpcap/dist/pcap-libdlpi.c vendor/libpcap/dist/pcap-linktype.manmisc.in vendor/libpcap/dist/pcap-linux.c vendor/libpcap/dist/pcap-netfilter-linux.c vendor/libpcap/dist/pcap-netfilter-linux.h vendor/libpcap/dist/pcap-nit.c vendor/libpcap/dist/pcap-null.c vendor/libpcap/dist/pcap-pf.c vendor/libpcap/dist/pcap-savefile.manfile.in vendor/libpcap/dist/pcap-septel.c vendor/libpcap/dist/pcap-sita.c vendor/libpcap/dist/pcap-snf.c vendor/libpcap/dist/pcap-snit.c vendor/libpcap/dist/pcap-snoop.c vendor/libpcap/dist/pcap-stdinc.h vendor/libpcap/dist/pcap-tstamp.manmisc.in vendor/libpcap/dist/pcap-usb-linux.c vendor/libpcap/dist/pcap-usb-linux.h vendor/libpcap/dist/pcap-win32.c vendor/libpcap/dist/pcap.3pcap.in vendor/libpcap/dist/pcap.c vendor/libpcap/dist/pcap/bluetooth.h vendor/libpcap/dist/pcap/bpf.h vendor/libpcap/dist/pcap/namedb.h vendor/libpcap/dist/pcap/nflog.h vendor/libpcap/dist/pcap/pcap.h vendor/libpcap/dist/pcap/sll.h vendor/libpcap/dist/pcap/usb.h vendor/libpcap/dist/pcap_activate.3pcap vendor/libpcap/dist/pcap_breakloop.3pcap vendor/libpcap/dist/pcap_can_set_rfmon.3pcap vendor/libpcap/dist/pcap_close.3pcap vendor/libpcap/dist/pcap_compile.3pcap.in vendor/libpcap/dist/pcap_create.3pcap vendor/libpcap/dist/pcap_datalink.3pcap.in vendor/libpcap/dist/pcap_datalink_name_to_val.3pcap vendor/libpcap/dist/pcap_datalink_val_to_name.3pcap vendor/libpcap/dist/pcap_dump.3pcap vendor/libpcap/dist/pcap_dump_close.3pcap vendor/libpcap/dist/pcap_dump_file.3pcap vendor/libpcap/dist/pcap_dump_flush.3pcap vendor/libpcap/dist/pcap_dump_ftell.3pcap vendor/libpcap/dist/pcap_dump_open.3pcap.in vendor/libpcap/dist/pcap_file.3pcap vendor/libpcap/dist/pcap_fileno.3pcap vendor/libpcap/dist/pcap_findalldevs.3pcap vendor/libpcap/dist/pcap_freecode.3pcap vendor/libpcap/dist/pcap_get_selectable_fd.3pcap vendor/libpcap/dist/pcap_get_tstamp_precision.3pcap.in vendor/libpcap/dist/pcap_geterr.3pcap vendor/libpcap/dist/pcap_inject.3pcap vendor/libpcap/dist/pcap_is_swapped.3pcap vendor/libpcap/dist/pcap_lib_version.3pcap vendor/libpcap/dist/pcap_list_datalinks.3pcap.in vendor/libpcap/dist/pcap_list_tstamp_types.3pcap.in vendor/libpcap/dist/pcap_lookupdev.3pcap vendor/libpcap/dist/pcap_lookupnet.3pcap vendor/libpcap/dist/pcap_loop.3pcap vendor/libpcap/dist/pcap_major_version.3pcap vendor/libpcap/dist/pcap_next_ex.3pcap vendor/libpcap/dist/pcap_offline_filter.3pcap vendor/libpcap/dist/pcap_open_dead.3pcap.in vendor/libpcap/dist/pcap_open_live.3pcap vendor/libpcap/dist/pcap_open_offline.3pcap.in vendor/libpcap/dist/pcap_set_buffer_size.3pcap vendor/libpcap/dist/pcap_set_datalink.3pcap vendor/libpcap/dist/pcap_set_immediate_mode.3pcap vendor/libpcap/dist/pcap_set_promisc.3pcap vendor/libpcap/dist/pcap_set_rfmon.3pcap vendor/libpcap/dist/pcap_set_snaplen.3pcap vendor/libpcap/dist/pcap_set_timeout.3pcap vendor/libpcap/dist/pcap_set_tstamp_precision.3pcap.in vendor/libpcap/dist/pcap_set_tstamp_type.3pcap.in vendor/libpcap/dist/pcap_setdirection.3pcap vendor/libpcap/dist/pcap_setfilter.3pcap vendor/libpcap/dist/pcap_setnonblock.3pcap vendor/libpcap/dist/pcap_snapshot.3pcap vendor/libpcap/dist/pcap_stats.3pcap vendor/libpcap/dist/pcap_statustostr.3pcap vendor/libpcap/dist/pcap_strerror.3pcap vendor/libpcap/dist/pcap_tstamp_type_name_to_val.3pcap vendor/libpcap/dist/pcap_tstamp_type_val_to_name.3pcap vendor/libpcap/dist/savefile.c vendor/libpcap/dist/scanner.l vendor/libpcap/dist/sf-pcap-ng.c vendor/libpcap/dist/sf-pcap.c vendor/libpcap/dist/tests/capturetest.c vendor/libpcap/dist/tests/filtertest.c vendor/libpcap/dist/tests/findalldevstest.c vendor/libpcap/dist/tests/opentest.c vendor/libpcap/dist/tests/reactivatetest.c vendor/libpcap/dist/tests/selpolltest.c vendor/libpcap/dist/tests/valgrindtest.c Modified: vendor/libpcap/dist/CHANGES ============================================================================== --- vendor/libpcap/dist/CHANGES Sun Feb 12 06:56:33 2017 (r313675) +++ vendor/libpcap/dist/CHANGES Sun Feb 12 07:04:44 2017 (r313676) @@ -1,5 +1,80 @@ +Tuesday, Oct. 25, 2016 mcr@sandelman.ca + Summary for 1.8.1 libpcap release + Add a target in Makefile.in for Exuberant Ctags use: 'extags'. + Rename configure.in to configure.ac: autoconf 2.59 + Clean up the name-to-DLT mapping table. + Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS + Clarify what the return values are for both success and failure. + Many changes to build on windows + Check for the "break the loop" condition in the inner loop for TPACKET_V3. + Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493. + Filter out duplicate looped back CAN frames. + Fix the handling of loopback filters for IPv6 packets. + Add a link-layer header type for RDS (IEC 62106) groups. + Use different intermediate folders for x86 and x64 builds on Windows. + On Linux, handle all CAN captures with pcap-linux.c, in cooked mode. + Removes the need for the "host-endian" link-layer header type. + Compile with '-Wused-but-marked-unused' in devel mode if supported + Have separate DLTs for big-endian and host-endian SocketCAN headers. + Reflect version.h being renamed to pcap_version.h. + Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)! + Properly check for sock_recv() errors. + Re-impose some of Winsock's limitations on sock_recv(). + Replace sprintf() with pcap_snprintf(). + Fix signature of pcap_stats_ex_remote(). + Initial cmake support for remote packet capture. + Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag. + Clean up {DAG, Septel, Myricom SNF}-only builds. + Do UTF-16-to-ASCII conversion into the right place. + pcap_create_interface() needs the interface name on Linux. + Clean up hardware time stamp support: the "any" device does not support any time stamp types. + Add support for capturing on FreeBSD usbusN interfaces. + Add a LINKTYPE/DLT_ value for FreeBSD USB. + Go back to using PCAP_API on Windows. + CMake support + Add TurboCap support from WinPcap. + Recognize 802.1ad nested VLAN tag in vlan filter. + +Thursday Sep. 3, 2015 guy@alum.mit.edu + Summary for 1.7.5 libpcap release + Man page cleanups. + Add some allocation failure checks. + Fix a number of Linux/ucLinux configure/build issues. + Fix some memory leaks. + Recognize 802.1ad nested VLAN tag in vlan filter. + Fix building Bluetooth Linux Monitor support with BlueZ 5.1+ + +Saturday Jun. 27, 2015 mcr@sandelman.ca + Summary for 1.7.4 libpcap release + Include fix for GitHub issue #424 -- out of tree builds. + +Friday Apr. 10, 2015 guy@alum.mit.edu + Summary for 1.7.3 libpcap release + Work around a Linux bonding driver bug. + +Thursday Feb. 12, 2015 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.2 libpcap release + Support for filtering Geneve encapsulated packets. + Generalize encapsulation handling, fixing some bugs. + Don't add null addresses to address lists. + Add pcap_dump_open_append() to open for appending. + Fix the swapping of isochronous descriptors in Linux USB. + Attempt to handle TPACKET_V1 with 32-bit userland and 64-bit kernel. + +Wednesday Nov. 12, 2014 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.0 libpcap release + Fix handling of zones for BPF on Solaris + new DLT for ZWAVE + clarifications for read timeouts. + Use BPF extensions in compiled filters, fixing VLAN filters + some fixes to compilation without stdint.h + EBUSY can now be returned by SNFv3 code. + Fix the range checks in BPF loads + Various DAG fixes. + Various Linux fixes. + Monday Aug. 12, 2014 guy@alum.mit.edu - Summary for 1.6.2 tcpdump release + Summary for 1.6.2 libpcap release Don't crash on filters testing a non-existent link-layer type field. Fix sending in non-blocking mode on Linux with memory-mapped @@ -8,12 +83,12 @@ Monday Aug. 12, 2014 guy@alum.mit.edu machines. Saturday Jul. 19, 2014 mcr@sandelman.ca - Summary for 1.6.1 tcpdump release + Summary for 1.6.1 libpcap release some fixes for the any device - changes for how --enable-XXX works + changes for how --enable-XXX (--enable-sniffing, --enable-can) works Wednesday Jul. 2, 2014 mcr@sandelman.ca - Summary for 1.6.0 tcpdump release + Summary for 1.6.0 libpcap release Don't support D-Bus sniffing on OS X fixes for byte order issues with NFLOG captures Handle using cooked mode for DLT_NETLINK in activate_new(). Added: vendor/libpcap/dist/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libpcap/dist/CMakeLists.txt Sun Feb 12 07:04:44 2017 (r313676) @@ -0,0 +1,520 @@ +cmake_minimum_required( VERSION 2.8.8 ) + +project( pcap ) +# +# Call the library "wpcap" on Windows, for backwards compatibility. +# +if( WIN32 ) + set( LIBRARY_NAME wpcap ) +else() + set( LIBRARY_NAME pcap ) +endif() + +################################################################### +# Parameters +################################################################### + +option (INET6 "Enable IPv6" ON) +if( MSVC ) + option (USE_STATIC_RT "Use static Runtime" ON) +endif( MSVC ) +option (BUILD_SHARED_LIBS "Build shared libraries" ON) +if( WIN32 ) + set(PACKET_DLL_DIR "" CACHE PATH "Path to directory with include and lib subdirectories for packet.dll") +endif( WIN32 ) + +# +# XXX - this should be an option, defaulting to "yes" for Windows and to +# "no", for now, on UN*X. +# +if( WIN32 ) + set( HAVE_REMOTE 1 ) +endif( WIN32 ) + +###################################### +# Project settings +###################################### + +add_definitions( -DHAVE_CONFIG_H ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${pcap_SOURCE_DIR} +) + +if( WIN32 ) + if( NOT "${PACKET_DLL_DIR}" STREQUAL "" ) + include_directories("${PACKET_DLL_DIR}/Include") + if( CMAKE_CL_64 ) + link_directories("${PACKET_DLL_DIR}/Lib/x64") + else( CMAKE_CL_64 ) + link_directories("${PACKET_DLL_DIR}/Lib") + endif( CMAKE_CL_64 ) + endif() + include_directories( + ../Common/ + Win32/Include + ) +endif( WIN32) + +add_definitions( -DBUILDING_PCAP ) + +if( MSVC ) + add_definitions( -D__STDC__ ) + add_definitions( -D_CRT_SECURE_NO_WARNINGS ) + add_definitions( "-D_U_=" ) +elseif( CMAKE_COMPILER_IS_GNUCXX ) + add_definitions( "-D_U_=__attribute__((unused))" ) +else(MSVC) + add_definitions( "-D_U_=" ) +endif( MSVC ) + +if( MSVC ) + if (USE_STATIC_RT) + MESSAGE( STATUS "Use STATIC runtime" ) + set(NAME_RT MT) + set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT") + set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT") + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") + + set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT") + set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") + set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") + else (USE_STATIC_RT) + MESSAGE( STATUS "Use DYNAMIC runtime" ) + set(NAME_RT MD) + set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD") + set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + + set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD") + set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD") + set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd") + endif (USE_STATIC_RT) +endif( MSVC ) + +################################################################### +# Detect available platform features +################################################################### + +include(CheckIncludeFile) +include(CheckFunctionExists) +include(CheckStructHasMember) +include(CheckTypeSize) + +# +# Header files. +# +check_include_file( inttypes.h HAVE_INTTYPES_H ) +check_include_file( stdint.h HAVE_STDINT_H ) +check_include_file( unistd.h HAVE_UNISTD_H ) +if( NOT HAVE_UNISTD_H ) + add_definitions( -DYY_NO_UNISTD_H ) +endif( NOT HAVE_UNISTD_H ) +check_include_file( bitypes.h HAVE_SYS_BITYPES_H ) +check_include_file( limits.h HAVE_LIMITS_H ) + +# +# Functions. +# +check_function_exists( strerror HAVE_STRERROR ) +check_function_exists( strlcpy HAVE_STRLCPY ) +check_function_exists( snprintf HAVE_SNPRINTF ) +check_function_exists( vsnprintf HAVE_VSNPRINTF ) +check_function_exists( strtok_r HAVE_STRTOK_R ) + +if (WIN32) + # + # Check for Windows-only functions, such as packet.dll functions. + # + check_function_exists( PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER ) +endif() + +# +# Data types. +# +# XXX - there's no check_struct() macro that's like check_struct_has_member() +# except that it only checks for the existence of the structure type, +# so we use check_struct_has_member() and look for ss_family. +# +check_struct_has_member("struct sockaddr_storage" ss_family sys/socket.h HAVE_SOCKADDR_STORAGE) +set(CMAKE_EXTRA_INCLUDE_FILES unistd.h sys/socket.h) +check_type_size("socklen_t" SOCKLEN_T) +set(CMAKE_EXTRA_INCLUDE_FILES unistd.h) + +# +# Structure fields. +# +check_struct_has_member("struct sockaddr" sa_len sys/socket.h HAVE_SOCKADDR_SA_LEN ) + +if( INET6 ) + MESSAGE( STATUS "Use IPv6" ) +endif( INET6 ) + +if( WIN32 ) + add_definitions( -DHAVE_ADDRINFO ) +endif( WIN32 ) + +###################################### +# External dependencies +###################################### + +###################################### +# Input files +###################################### + +set(PROJECT_SOURCE_LIST_C + bpf_dump.c + bpf_image.c + etherent.c + fad-helpers.c + gencode.c + inet.c + nametoaddr.c + optimize.c + pcap-common.c + pcap.c + savefile.c + sf-pcap-ng.c + sf-pcap.c + bpf/net/bpf_filter.c +) + +if( WIN32 ) + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/win_snprintf.c ) +else() + if( NOT HAVE_SNPRINTF ) + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/snprintf.c ) + endif( NOT HAVE_SNPRINTF ) + if( NOT HAVE_STRTOK_R ) + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strtok_r.c ) + endif( NOT HAVE_STRTOK_R ) +endif( WIN32 ) + +if( HAVE_REMOTE ) + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} + pcap-new.c pcap-rpcap.c sockutils.c) +endif( HAVE_REMOTE ) + +# +# Determine the main pcap-XXX.c file to use. +# +if( WIN32 ) + # + # WinPcap. + # + set( PCAP_TYPE win32 ) +else() + # + # UN*X - figure out what type of packet capture mechanism we + # have. + # + if( EXISTS /dev/bpf ) + # + # Cloning BPF device. + # + set( PCAP_TYPE bpf ) + AC_DEFINE(HAVE_CLONING_BPF,1,[define if you have a cloning BPF device]) + elseif( EXISTS /dev/bpf0 ) + set( PCAP_TYPE bpf ) + + # + # XXX - many more BPF checks. + # + elseif( EXISTS /usr/include/net/pfilt.h ) + # + # DEC OSF/1, Digital UNIX, Tru64 UNIX + # + set( PCAP_TYPE pf ) + elseif( EXISTS /dev/enet ) + set( PCAP_TYPE enet ) + elseif( EXISTS /dev/nit ) + set( PCAP_TYPE snit ) + elseif( EXISTS /usr/include/sys/net/nit.h ) + set( PCAP_TYPE nit ) + elseif( EXISTS /usr/include/linux/socket.h ) + set( PCAP_TYPE linux ) + + # + # Do we have the wireless extensions? + # + check_include_file( linux/wireless.h HAVE_LINUX_WIRELESS_H ) + + # + # XXX - many more Linux checks. + # + elseif( EXISTS /usr/include/net/raw.h ) + set( PCAP_TYPE snoop ) + elseif( EXISTS /usr/include/odmi.h ) + # + # On AIX, the BPF devices might not yet be present - they're + # created the first time libpcap runs after booting. + # We check for odmi.h instead. + # + set( PCAP_TYPE bpf ) + elseif( /usr/include/sys/dlpi.h ) + set( PCAP_TYPE dlpi ) + + # + # XXX - many more DLPI checks. + # + else() + set( PCAP_TYPE null ) + endif() +endif( WIN32 ) +message(STATUS "Packet capture mechanism type: ${PCAP_TYPE}") +set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-${PCAP_TYPE}.c) + +# +# Now figure out how we get a list of interfaces and addresses, +# if we support capturing. Don't bother if we don't support +# capturing. +# +if( NOT WIN32 ) + # + # UN*X - figure out what type of interface list mechanism we + # have. + # + if( ${PCAP_TYPE} STREQUAL "null" ) + # + # We can't capture, so we can't open any capture + # devices, so we won't return any interfaces. + # + set( FINDALLDEVS_TYPE null ) + else() + check_function_exists( getifaddrs HAVE_GETIFADDRS ) + if( ${HAVE_GETIFADDRS} ) + # + # We have "getifaddrs()"; make sure we have + # as well, just in case some platform is really weird. + # + check_include_file( ifaddrs.h HAVE_IFADDRS_H ) + if( ${HAVE_IFADDRS_H} ) + # + # We have the header, so we use "getifaddrs()" to + # get the list of interfaces. + # + set( FINDALLDEVS_TYPE getad ) + else() + # + # We don't have the header - give up. + # XXX - we could also fall back on some other + # mechanism, but, for now, this'll catch this + # problem so that we can at least try to figure + # out something to do on systems with "getifaddrs()" + # but without "ifaddrs.h", if there is something + # we can do on those systems. + # + message(FATAL_ERROR "Your system has getifaddrs() but doesn't have a usable ." ) + endif() + else() + # + # Well, we don't have "getifaddrs()", so we have to use + # some other mechanism; determine what that mechanism is. + # + # The first thing we use is the type of capture mechanism, + # which is somewhat of a proxy for the OS we're using. + # + if( ${PCAP_TYPE} STREQUAL "dlpi" OR ${PCAP_TYPE} STREQUAL "libdlpi" ) + # + # This might be Solaris 8 or later, with + # SIOCGLIFCONF, or it might be some other OS + # or some older version of Solaris, with + # just SIOCGIFCONF. + # + try_compile( HAVE_SIOCGLIFCONF ${CMAKE_CURRENT_BINARY_DIR} "${pcap_SOURCE_DIR}/config/have_siocglifconf.c" ) + message( STATUS "HAVE_SIOCGLIFCONF = ${HAVE_SIOCGLIFCONF}" ) + if( HAVE_SIOCGLIFCONF ) + set( FINDALLDEVS_TYPE glifc ) + else() + set( FINDALLDEVS_TYPE gifc ) + endif() + else() + # + # Assume we just have SIOCGIFCONF. + # (XXX - on at least later Linux kernels, there's + # another mechanism, and we should be using that + # instead.) + # + set( FINDALLDEVS_TYPE gifc ) + endif() + endif() + endif() + message(STATUS "Find-interfaces mechanism type: ${FINDALLDEVS_TYPE}") + set( PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} fad-${FINDALLDEVS_TYPE}.c ) +endif() + +file(GLOB PROJECT_SOURCE_LIST_CORE_H + *.h + pcap/*.h +) +set( PROJECT_SOURCE_LIST_H ${PROJECT_SOURCE_LIST_H} ${PROJECT_SOURCE_LIST_CORE_H} ) + +if( WIN32 ) + file(GLOB PROJECT_SOURCE_LIST_WIN32_H + Win32/Include/*.h + ) + set( PROJECT_SOURCE_LIST_H ${PROJECT_SOURCE_LIST_H} ${PROJECT_SOURCE_LIST_WIN32_H} ) +endif( WIN32 ) + +# +# {Flex} and YACC/Berkeley YACC/Bison. +# From a mail message to the CMake mailing list by Andy Cedilnik of +# Kitware. +# + +# +# Try to find Flex, a Windows version of Flex, or Lex. +# +find_program(LEX_EXECUTABLE NAMES flex win_flex lex) +if( ${LEX_EXECUTABLE} STREQUAL "LEX_EXECUTABLE-NOTFOUND" ) + message(FATAL_ERROR "Neither flex nor win_flex nor lex was found." ) +endif() +message(STATUS "Lexical analyzer generator: ${LEX_EXECUTABLE}") + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/scanner.c ${CMAKE_CURRENT_BINARY_DIR}/scanner.h + SOURCE ${pcap_SOURCE_DIR}/scanner.l + COMMAND ${LEX_EXECUTABLE} -P pcap_ --header-file=scanner.h --nounput -o${CMAKE_CURRENT_BINARY_DIR}/scanner.c ${pcap_SOURCE_DIR}/scanner.l + DEPENDS ${pcap_SOURCE_DIR}/scanner.l +) + +# +# Since scanner.c does not exist yet when cmake is run, mark +# it as generated. +# +# Since scanner.c includes grammar.h, mark that as a dependency. +# +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/scanner.c PROPERTIES + GENERATED TRUE + OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/scanner.h +) + +# +# Add scanner.c to the list of sources. +# +#set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} ${CMAKE_CURRENT_BINARY_DIR}/scanner.c) + +# +# Try to find YACC or Bison. +# +find_program(YACC_EXECUTABLE NAMES bison win_bison byacc yacc) +if( ${YACC_EXECUTABLE} STREQUAL "YACC_EXECUTABLE-NOTFOUND" ) + message(FATAL_ERROR "Neither bison nor win_bison nor byacc nor yacc was found." ) +endif() +message(STATUS "Parser generator: ${YACC_EXECUTABLE}") + +# +# Create custom command for the scanner. +# Find out whether it's Bison or notby looking at the last component +# of the path (without a .exe extension, if this is Windows). +# +get_filename_component(YACC_NAME ${YACC_EXECUTABLE} NAME_WE) +if( "${YACC_NAME}" STREQUAL "bison" OR "${YACC_NAME}" STREQUAL "win_bison" ) + set( YACC_COMPATIBILITY_FLAG "-y" ) +endif() +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/grammar.c ${CMAKE_CURRENT_BINARY_DIR}/grammar.h + SOURCE ${pcap_SOURCE_DIR}/grammar.y + COMMAND ${YACC_EXECUTABLE} ${YACC_COMPATIBILITY_FLAG} -p pcap_ -o ${CMAKE_CURRENT_BINARY_DIR}/grammar.c -d ${pcap_SOURCE_DIR}/grammar.y + DEPENDS ${pcap_SOURCE_DIR}/grammar.y +) + +# +# Since grammar.c does not exists yet when cmake is run, mark +# it as generated. +# +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/grammar.c PROPERTIES + GENERATED TRUE +) + +# +# Add grammar.c to the list of sources. +# +#set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} ${CMAKE_CURRENT_BINARY_DIR}/grammar.c) + +if( WIN32 ) + # + # CMake does not love Windows. + # + file(TO_NATIVE_PATH "${pcap_SOURCE_DIR}/GenVersion.bat" GenVersion_path) + file(TO_NATIVE_PATH "${pcap_SOURCE_DIR}/VERSION" VERSION_path) + file(TO_NATIVE_PATH "${pcap_SOURCE_DIR}/pcap_version.h.in" version_h_in_path) + file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/pcap_version.h" version_h_path) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcap_version.h + SOURCE ${pcap_SOURCE_DIR}/VERSION ${pcap_SOURCE_DIR}/pcap_version.h.in + COMMAND ${GenVersion_path} ${VERSION_path} ${version_h_in_path} ${version_h_path} + DEPENDS ${pcap_SOURCE_DIR}/VERSION ${pcap_SOURCE_DIR}/pcap_version.h.in + ) +else( WIN32 ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.c + SOURCE ${pcap_SOURCE_DIR}/VERSION + COMMAND ${pcap_SOURCE_DIR}/gen_version_c.sh ${pcap_SOURCE_DIR}/VERSION ${CMAKE_CURRENT_BINARY_DIR}/version.c + DEPENDS ${pcap_SOURCE_DIR}/VERSION + ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcap_version.h + SOURCE ${pcap_SOURCE_DIR}/VERSION + COMMAND ${pcap_SOURCE_DIR}/gen_version_header.sh ${pcap_SOURCE_DIR}/VERSION ${pcap_SOURCE_DIR}/pcap_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcap_version.h + DEPENDS ${pcap_SOURCE_DIR}/VERSION + ) + + # + # Since version.c does not exists yet when cmake is run, mark + # it as generated. + # + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/version.c PROPERTIES + GENERATED TRUE + ) + + # + # Add version.c to the list of sources. + # + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} ${CMAKE_CURRENT_BINARY_DIR}/version.c) +endif( WIN32 ) + +# +# Since pcap_version.h does not exists yet when cmake is run, mark +# it as generated. +# +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/pcap_version.h PROPERTIES + GENERATED TRUE +) + +# +# Add pcap_version.h to the list of headers. +# +set(PROJECT_SOURCE_LIST_H ${PROJECT_SOURCE_LIST_H} ${CMAKE_CURRENT_BINARY_DIR}/pcap_version.h) + +source_group("Source Files" FILES ${PROJECT_SOURCE_LIST_C}) +source_group("Header Files" FILES ${PROJECT_SOURCE_LIST_H}) + +###################################### +# Register targets +###################################### + +add_library(${LIBRARY_NAME} + ${PROJECT_SOURCE_LIST_C} + ${CMAKE_CURRENT_BINARY_DIR}/grammar.c + ${CMAKE_CURRENT_BINARY_DIR}/scanner.c + ${PROJECT_SOURCE_LIST_H} +) + +if( WIN32 ) + target_link_libraries ( ${LIBRARY_NAME} + packet + ws2_32 + ) +endif( WIN32 ) + +###################################### +# Write out the config.h file +###################################### + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) Modified: vendor/libpcap/dist/CREDITS ============================================================================== --- vendor/libpcap/dist/CREDITS Sun Feb 12 06:56:33 2017 (r313675) +++ vendor/libpcap/dist/CREDITS Sun Feb 12 07:04:44 2017 (r313676) @@ -2,11 +2,12 @@ This file lists people who have contribu The current maintainers: Bill Fenner - Denis Ovsienko + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler Michael Richardson + Francois-Xavier Le Bail Additional people who have contributed patches: @@ -45,7 +46,7 @@ Additional people who have contributed p David Young Dean Gaudet dhruv - Don Ebright + Don Ebright Dug Song Dustin Spicuzza dzejarczech @@ -83,6 +84,7 @@ Additional people who have contributed p Jefferson Ogata Jesper Dangaard Brouer Jesper Peterson + Jesse Gross Jiri Slaby Joerg Mayer John Bankier @@ -105,6 +107,7 @@ Additional people who have contributed p Mansour Behabadi Marcus Felipe Pereira Mark C. Brown + Mark Johnston Mark Pizzolato Markus Mayer Martin Husemann Added: vendor/libpcap/dist/GenVersion.bat ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libpcap/dist/GenVersion.bat Sun Feb 12 07:04:44 2017 (r313676) @@ -0,0 +1,23 @@ +REM +REM Automatically generate pcap_version.h based on pcap_version.h.in +REM for Windows +REM The version string comes from VERSION +REM @echo off +REM + +setlocal enableextensions disabledelayedexpansion + +set "search=%%%%LIBPCAP_VERSION%%%%" +set /p replace=<%1 + +if exist %3 del %3 2>nul + +for /f "delims=" %%i in ('type %2' ) do ( + set "line=%%i" + setlocal enabledelayedexpansion + set "line=!line:%search%=%replace%!" + >>%3 echo(!line! + endlocal +) + +echo pcap_version.h generated Modified: vendor/libpcap/dist/INSTALL.txt ============================================================================== --- vendor/libpcap/dist/INSTALL.txt Sun Feb 12 06:56:33 2017 (r313675) +++ vendor/libpcap/dist/INSTALL.txt Sun Feb 12 07:04:44 2017 (r313676) @@ -16,7 +16,7 @@ does support packet capture but libpcap particular type. (If you have HP-UX, see below.) If your system uses a packet capture not supported by libpcap, please send us patches; don't forget to include an autoconf fragment suitable for use in -configure.in. +configure.ac. It is possible to override the default packet capture type, although the circumstance where this works are limited. For example if you have @@ -31,40 +31,22 @@ You will need an ANSI C compiler to buil will abort if your compiler is not ANSI compliant. If this happens, use the generally available GNU C compiler (GCC). -If you use flex, you must use version 2.4.6 or higher. The configure -script automatically detects the version of flex and will not use it -unless it is new enough. You can use "flex -V" to see what version you -have (unless it's really old). The current version of flex is available -at flex.sourceforge.net and often comes packaged by means of the OS. -As of this writing, the current version is 2.5.37. - -If you use bison, you must use flex (and visa versa). The configure -script automatically falls back to lex and yacc if both flex and bison -are not found. - -Sometimes the stock C compiler does not interact well with flex and -bison. The list of problems includes undefined references for alloca. -You can get around this by installing gcc or manually disabling flex -and bison with: - - ./configure --without-flex --without-bison - -If your system only has AT&T lex, this is okay unless your libpcap -program uses other lex/yacc generated code. (Although it's possible to -map the yy* identifiers with a script, we use flex and bison so we -don't feel this is necessary.) - -Some systems support the Berkeley Packet Filter natively; for example -out of the box OSF and BSD/OS have bpf. If your system does not support -bpf, you will need to pick up: - - ftp://ftp.ee.lbl.gov/bpf-*.tar.Z - -Note well: you MUST have kernel source for your operating system in -order to install bpf. An exception is SunOS 4; the bpf distribution -includes replacement kernel objects for some of the standard SunOS 4 -network device drivers. See the bpf INSTALL document for more -information. +You will need either Flex 2.5.31 or later, or a version of Lex +compatible with it (if any exist), to build libpcap. The configure +script will abort if there isn't any such program. If you have an older +version of Flex, or don't have a compatible version of Lex, the current +version of flex is available at flex.sourceforge.net. + +You will need either Bison, Berkeley YACC, or a version of YACC +compatible with them (if any exist), to build libpcap. The configure +script will abort if there isn't any such program. If you don't have +any such program, the current version of Bison can be found at +http://ftp.gnu.org/gnu/bison/ and the current version of Berkeley YACC +can be found at http://invisible-island.net/byacc/. + +Sometimes the stock C compiler does not interact well with Flex and +Bison. The list of problems includes undefined references for alloca. +You can get around this by installing GCC. If you use Solaris, there is a bug with bufmod(7) that is fixed in Solaris 2.3.2 (aka SunOS 5.3.2). Setting a snapshot length with the @@ -178,14 +160,14 @@ packet timestamps aren't very good. Thi handling of the timestamp in the kernel. Note well: there is rumoured to be a version of tcpdump floating around -called 3.0.3 that includes libpcap and is supposed to support Linux. +called 3.0.3 that includes libpcap and is supposed to support Linux. You should be advised that neither the Network Research Group at LBNL -nor the Tcpdump Group ever generated a release with this version number. +nor the Tcpdump Group ever generated a release with this version number. The LBNL Network Research Group notes with interest that a standard cracker trick to get people to install trojans is to distribute bogus -packages that have a version number higher than the current release. +packages that have a version number higher than the current release. They also noted with annoyance that 90% of the Linux related bug reports -they got are due to changes made to unofficial versions of their page. +they got are due to changes made to unofficial versions of their page. If you are having trouble but aren't using a version that came from tcpdump.org, please try that before submitting a bug report! @@ -239,11 +221,11 @@ the libpcap 0.6.2 source release, so thi build without changes on UnixWare 7. If linking tcpdump fails with "Undefined: _alloca" when using bison on -a Sun4, your version of bison is broken. In any case version 1.16 or +a Sun4, your version of Bison is broken. In any case version 1.16 or higher is recommended (1.14 is known to cause problems 1.16 is known to work). Either pick up a current version from: - ftp://ftp.gnu.org/pub/gnu/bison + http://ftp.gnu.org/gnu/bison/ or hack around it by inserting the lines: @@ -289,6 +271,7 @@ FILES CHANGES - description of differences between releases ChmodBPF/* - Mac OS X startup item to set ownership and permissions on /dev/bpf* +CMakeLists.txt - CMake file CREDITS - people that have helped libpcap along INSTALL.txt - this file LICENSE - the license under which tcpdump is distributed @@ -317,7 +300,7 @@ config.guess - autoconf support config.h.in - autoconf input config.sub - autoconf support configure - configure script (run this first) -configure.in - configure script source +configure.ac - configure script source dlpisubs.c - DLPI-related functions for pcap-dlpi.c and pcap-libdlpi.c dlpisubs.h - DLPI-related function declarations etherent.c - /etc/ethers support routines @@ -325,9 +308,6 @@ ethertype.h - Ethernet protocol types an fad-getad.c - pcap_findalldevs() for systems with getifaddrs() fad-gifc.c - pcap_findalldevs() for systems with only SIOCGIFLIST fad-glifc.c - pcap_findalldevs() for systems with SIOCGLIFCONF -fad-null.c - pcap_findalldevs() for systems without capture support -fad-sita.c - pcap_findalldevs() for systems with SITA support -fad-win32.c - pcap_findalldevs() for WinPcap filtertest.c - test program for BPF compiler findalldevstest.c - test program for pcap_findalldevs() gencode.c - BPF code generation routines @@ -345,7 +325,6 @@ nametoaddr.c - hostname to address routi nlpid.h - OSI network layer protocol identifier definitions net - symlink to bpf/net optimize.c - BPF optimization routines -packaging - packaging information for building libpcap RPMs pcap/bluetooth.h - public definition of DLT_BLUETOOTH_HCI_H4_WITH_PHDR header pcap/bpf.h - BPF definitions pcap/namedb.h - public libpcap name database definitions @@ -389,7 +368,6 @@ pcap_*.3pcap - manual entries for librar pcap-filter.4 - manual entry for filter syntax pcap-linktype.4 - manual entry for link-layer header types ppp.h - Point to Point Protocol definitions -runlex.sh - wrapper for Lex/Flex savefile.c - offline support scanner.l - filter string scanner sunatmpos.h - definitions for SunATM capturing Modified: vendor/libpcap/dist/LICENSE ============================================================================== --- vendor/libpcap/dist/LICENSE Sun Feb 12 06:56:33 2017 (r313675) +++ vendor/libpcap/dist/LICENSE Sun Feb 12 07:04:44 2017 (r313676) @@ -1,9 +1,9 @@ License: BSD - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright @@ -13,7 +13,7 @@ are met: 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Modified: vendor/libpcap/dist/Makefile-devel-adds ============================================================================== --- vendor/libpcap/dist/Makefile-devel-adds Sun Feb 12 06:56:33 2017 (r313675) +++ vendor/libpcap/dist/Makefile-devel-adds Sun Feb 12 07:04:44 2017 (r313676) @@ -2,12 +2,12 @@ # Auto-regenerate configure script or Makefile when things change. # From autoconf.info . Works best with GNU Make. # -${srcdir}/configure: configure.in aclocal.m4 +${srcdir}/configure: configure.ac aclocal.m4 cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: ${srcdir}/stamp-h.in -${srcdir}/stamp-h.in: configure.in aclocal.m4 +${srcdir}/stamp-h.in: configure.ac aclocal.m4 cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in Modified: vendor/libpcap/dist/Makefile.in ============================================================================== --- vendor/libpcap/dist/Makefile.in Sun Feb 12 06:56:33 2017 (r313675) +++ vendor/libpcap/dist/Makefile.in Sun Feb 12 07:04:44 2017 (r313676) @@ -49,12 +49,13 @@ LN_S = @LN_S@ MKDEP = @MKDEP@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ -DEFS = @DEFS@ @V_DEFS@ +DEFS = -DBUILDING_PCAP @DEFS@ @V_DEFS@ ADDLOBJS = @ADDLOBJS@ ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@ LIBS = @LIBS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ +CROSSFLAGS= +CFLAGS = @CFLAGS@ ${CROSSFLAGS} +LDFLAGS = @LDFLAGS@ ${CROSSFLAGS} DYEXT = @DYEXT@ V_RPATH_OPT = @V_RPATH_OPT@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ @@ -68,13 +69,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ -# -# Flex and bison allow you to specify the prefixes of the global symbols -# used by the generated parser. This allows programs to use lex/yacc -# and link against libpcap. If you don't have flex or bison, get them. -# -LEX = @V_LEX@ -YACC = @V_YACC@ +LEX = @LEX@ +YACC = @YACC@ # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. # Also, gcc does not remove the .o before forking 'as', which can be a @@ -83,11 +79,11 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@ -FSRC = fad-@V_FINDALLDEVS@.c +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @NETFILTER_SRC@ @DBUS_SRC@ +FSRC = @V_FINDALLDEVS@ SSRC = @SSRC@ -CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ - savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \ +CSRC = pcap.c inet.c fad-helpers.c gencode.c optimize.c nametoaddr.c \ + etherent.c savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \ bpf_image.c bpf_dump.c GENSRC = scanner.c grammar.c bpf_filter.c version.c LIBOBJS = @LIBOBJS@ @@ -103,6 +99,9 @@ PUBHDR = \ pcap-namedb.h \ pcap/bpf.h \ pcap/bluetooth.h \ + pcap/can_socketcan.h \ + pcap/dlt.h \ + pcap/export-defs.h \ pcap/ipnet.h \ pcap/namedb.h \ pcap/nflog.h \ @@ -115,37 +114,43 @@ HDR = $(PUBHDR) \ arcnet.h \ atmuni31.h \ ethertype.h \ + extract.h \ gencode.h \ ieee80211.h \ llc.h \ + nametoaddr.h \ nlpid.h \ pcap-common.h \ pcap-int.h \ pcap-stdinc.h \ + portability.h \ ppp.h \ sf-pcap.h \ sf-pcap-ng.h \ sunatmpos.h TESTS = \ + @VALGRINDTEST@ \ capturetest \ + can_set_rfmon_test \ filtertest \ findalldevstest \ opentest \ - selpolltest \ - valgrindtest + reactivatetest \ + selpolltest TESTS_SRC = \ + tests/valgrindtest.c \ tests/capturetest.c \ + tests/can_set_rfmon_test.c \ tests/filtertest.c \ tests/findalldevstest.c \ tests/opentest.c \ tests/reactivatetest.c \ - tests/selpolltest.c \ - tests/valgrindtest.c + tests/selpolltest.c GENHDR = \ - scanner.h tokdefs.h version.h + scanner.h grammar.h pcap_version.h TAGFILES = \ $(SRC) $(HDR) @@ -231,6 +236,8 @@ EXTRA_DIST = \ ChmodBPF/ChmodBPF \ ChmodBPF/StartupParameters.plist \ CREDITS \ + CMakeLists.txt \ + GenVersion.bat \ INSTALL.txt \ LICENSE \ Makefile.in \ @@ -253,29 +260,37 @@ EXTRA_DIST = \ aclocal.m4 \ bpf/net/bpf_filter.c \ chmod_bpf \ + cmakeconfig.h.in \ + cmake/preconfigure.cmake \ + config/have_siocglifconf.c \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sun Feb 12 07:05:32 2017 Return-Path: Delivered-To: svn-src-vendor@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 B3985CDC049; Sun, 12 Feb 2017 07:05:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 695BD16E6; Sun, 12 Feb 2017 07:05:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1C75VU2013076; Sun, 12 Feb 2017 07:05:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1C75VNs013075; Sun, 12 Feb 2017 07:05:31 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702120705.v1C75VNs013075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 12 Feb 2017 07:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313677 - vendor/libpcap/1.8.1 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2017 07:05:32 -0000 Author: delphij Date: Sun Feb 12 07:05:31 2017 New Revision: 313677 URL: https://svnweb.freebsd.org/changeset/base/313677 Log: Tag libpcap 1.8.1. Added: vendor/libpcap/1.8.1/ - copied from r313676, vendor/libpcap/dist/ From owner-svn-src-vendor@freebsd.org Wed Feb 15 07:19:24 2017 Return-Path: Delivered-To: svn-src-vendor@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 CF796CDF42C; Wed, 15 Feb 2017 07:19:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 824CE12FC; Wed, 15 Feb 2017 07:19:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1F7JNOD097714; Wed, 15 Feb 2017 07:19:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1F7JNmP097712; Wed, 15 Feb 2017 07:19:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201702150719.v1F7JNmP097712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 15 Feb 2017 07:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313759 - vendor/libpcap/dist/pcap X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 07:19:24 -0000 Author: delphij Date: Wed Feb 15 07:19:23 2017 New Revision: 313759 URL: https://svnweb.freebsd.org/changeset/base/313759 Log: Import license changes from upstream 5c5039637f2be0e3167ff6806b4c2741ebab2181. Modified: vendor/libpcap/dist/pcap/bpf.h vendor/libpcap/dist/pcap/dlt.h Modified: vendor/libpcap/dist/pcap/bpf.h ============================================================================== --- vendor/libpcap/dist/pcap/bpf.h Wed Feb 15 06:07:01 2017 (r313758) +++ vendor/libpcap/dist/pcap/bpf.h Wed Feb 15 07:19:23 2017 (r313759) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: vendor/libpcap/dist/pcap/dlt.h ============================================================================== --- vendor/libpcap/dist/pcap/dlt.h Wed Feb 15 06:07:01 2017 (r313758) +++ vendor/libpcap/dist/pcap/dlt.h Wed Feb 15 07:19:23 2017 (r313759) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-vendor@freebsd.org Wed Feb 15 20:00:38 2017 Return-Path: Delivered-To: svn-src-vendor@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 541CECE0654; Wed, 15 Feb 2017 20:00:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 22EC2100E; Wed, 15 Feb 2017 20:00:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1FK0bZr008263; Wed, 15 Feb 2017 20:00:37 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1FK0agl008253; Wed, 15 Feb 2017 20:00:36 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702152000.v1FK0agl008253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Wed, 15 Feb 2017 20:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313781 - in vendor/libarchive/dist/libarchive: . test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 20:00:38 -0000 Author: mm Date: Wed Feb 15 20:00:36 2017 New Revision: 313781 URL: https://svnweb.freebsd.org/changeset/base/313781 Log: Update vendor/libarchive to git 0edabbad1f44641c64fe9d0cbaed27ed93ab38c2 Vendor changes: Make SCHILY.acl.ace header more compact (NFSv4 ACLs) Vendor bugfixes: zip reader integer parsing fix (OSS-Fuzz 556) spelling fixes (issue #863) Modified: vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_entry_acl.3 vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_write_disk_acl.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/test/test_acl_pax_nfs4.tar.uu vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c vendor/libarchive/dist/libarchive/test/test_acl_text.c Modified: vendor/libarchive/dist/libarchive/archive_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl.c Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_acl.c Wed Feb 15 20:00:36 2017 (r313781) @@ -83,6 +83,50 @@ static void append_entry(char **p, const int tag, int flags, const char *name, int perm, int id); static void append_id(char **p, int id); +static const struct { + const int perm; + const char c; + const wchar_t wc; +} nfsv4_acl_perm_map[] = { + { ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, 'r', + L'r' }, + { ARCHIVE_ENTRY_ACL_WRITE_DATA | ARCHIVE_ENTRY_ACL_ADD_FILE, 'w', + L'w' }, + { ARCHIVE_ENTRY_ACL_EXECUTE, 'x', L'x' }, + { ARCHIVE_ENTRY_ACL_APPEND_DATA | ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, + 'p', L'p' }, + { ARCHIVE_ENTRY_ACL_DELETE, 'd', L'd' }, + { ARCHIVE_ENTRY_ACL_DELETE_CHILD, 'D', L'D' }, + { ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, 'a', L'a' }, + { ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, 'A', L'A' }, + { ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, 'R', L'R' }, + { ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, 'W', L'W' }, + { ARCHIVE_ENTRY_ACL_READ_ACL, 'c', L'c' }, + { ARCHIVE_ENTRY_ACL_WRITE_ACL, 'C', L'C' }, + { ARCHIVE_ENTRY_ACL_WRITE_OWNER, 'o', L'o' }, + { ARCHIVE_ENTRY_ACL_SYNCHRONIZE, 's', L's' } +}; + +static const int nfsv4_acl_perm_map_size = (int)(sizeof(nfsv4_acl_perm_map) / + sizeof(nfsv4_acl_perm_map[0])); + +static const struct { + const int perm; + const char c; + const wchar_t wc; +} nfsv4_acl_flag_map[] = { + { ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, 'f', L'f' }, + { ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, 'd', L'd' }, + { ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, 'i', L'i' }, + { ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, 'n', L'n' }, + { ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, 'S', L'S' }, + { ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, 'F', L'F' }, + { ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, 'I', L'I' } +}; + +static const int nfsv4_acl_flag_map_size = (int)(sizeof(nfsv4_acl_flag_map) / + sizeof(nfsv4_acl_flag_map[0])); + void archive_acl_clear(struct archive_acl *acl) { @@ -741,6 +785,8 @@ static void append_entry_w(wchar_t **wp, const wchar_t *prefix, int type, int tag, int flags, const wchar_t *wname, int perm, int id) { + int i; + if (prefix != NULL) { wcscpy(*wp, prefix); *wp += wcslen(*wp); @@ -810,46 +856,20 @@ append_entry_w(wchar_t **wp, const wchar *(*wp)++ = (perm & 0222) ? L'w' : L'-'; *(*wp)++ = (perm & 0111) ? L'x' : L'-'; } else { - /* NFS4 ACL perms */ - *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA | - ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? L'r' : L'-'; - *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA | - ARCHIVE_ENTRY_ACL_ADD_FILE)) ? L'w' : L'-'; - *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_EXECUTE) ? L'x' : L'-'; - *(*wp)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA | - ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? L'p' : L'-'; - *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? L'd' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? L'D' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? L'a' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? L'A' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? L'R' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS) ? L'W' : L'-'; - *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_READ_ACL) ? L'c' : L'-'; - *(*wp)++ = (perm & ARCHIVE_ENTRY_ACL_WRITE_ACL) ? L'C' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_OWNER) ? L'o' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_SYNCHRONIZE) ? L's' : L'-'; + /* NFSv4 ACL perms */ + for (i = 0; i < nfsv4_acl_perm_map_size; i++) { + if (perm & nfsv4_acl_perm_map[i].perm) + *(*wp)++ = nfsv4_acl_perm_map[i].wc; + else if ((flags & ARCHIVE_ENTRY_ACL_STYLE_COMPACT) == 0) + *(*wp)++ = L'-'; + } *(*wp)++ = L':'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT) ? L'f' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT) ? L'd' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY) ? L'i' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT) ? L'n' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS) ? L'S' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS) ? L'F' : L'-'; - *(*wp)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) ? L'I' : L'-'; + for (i = 0; i < nfsv4_acl_flag_map_size; i++) { + if (perm & nfsv4_acl_flag_map[i].perm) + *(*wp)++ = nfsv4_acl_flag_map[i].wc; + else if ((flags & ARCHIVE_ENTRY_ACL_STYLE_COMPACT) == 0) + *(*wp)++ = L'-'; + } *(*wp)++ = L':'; switch (type) { case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: @@ -998,6 +1018,8 @@ static void append_entry(char **p, const char *prefix, int type, int tag, int flags, const char *name, int perm, int id) { + int i; + if (prefix != NULL) { strcpy(*p, prefix); *p += strlen(*p); @@ -1067,47 +1089,20 @@ append_entry(char **p, const char *prefi *(*p)++ = (perm & 0222) ? 'w' : '-'; *(*p)++ = (perm & 0111) ? 'x' : '-'; } else { - /* NFS4 ACL perms */ - *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_READ_DATA | - ARCHIVE_ENTRY_ACL_LIST_DIRECTORY)) ? 'r' : '-'; - *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_WRITE_DATA | - ARCHIVE_ENTRY_ACL_ADD_FILE)) ? 'w' : '-'; - *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_EXECUTE)) ? 'x' : '-'; - *(*p)++ = (perm & (ARCHIVE_ENTRY_ACL_APPEND_DATA | - ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY)) ? 'p' : '-'; - *(*p)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE) ? 'd' : '-'; - *(*p)++ = (perm & ARCHIVE_ENTRY_ACL_DELETE_CHILD) ? 'D' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES) ? 'a' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES) ? 'A' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS) ? 'R' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS) ? 'W' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_READ_ACL) ? 'c' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_ACL) ? 'C' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_WRITE_OWNER) ? 'o' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_SYNCHRONIZE) ? 's' : '-'; + /* NFSv4 ACL perms */ + for (i = 0; i < nfsv4_acl_perm_map_size; i++) { + if (perm & nfsv4_acl_perm_map[i].perm) + *(*p)++ = nfsv4_acl_perm_map[i].c; + else if ((flags & ARCHIVE_ENTRY_ACL_STYLE_COMPACT) == 0) + *(*p)++ = '-'; + } *(*p)++ = ':'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT) ? 'f' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT) ? 'd' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY) ? 'i' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT) ? 'n' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS) ? 'S' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS) ? 'F' : '-'; - *(*p)++ = (perm & - ARCHIVE_ENTRY_ACL_ENTRY_INHERITED) ? 'I' : '-'; + for (i = 0; i < nfsv4_acl_flag_map_size; i++) { + if (perm & nfsv4_acl_flag_map[i].perm) + *(*p)++ = nfsv4_acl_flag_map[i].c; + else if ((flags & ARCHIVE_ENTRY_ACL_STYLE_COMPACT) == 0) + *(*p)++ = '-'; + } *(*p)++ = ':'; switch (type) { case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: @@ -1467,11 +1462,8 @@ ismode_w(const wchar_t *start, const wch static int is_nfs4_perms_w(const wchar_t *start, const wchar_t *end, int *permset) { - const wchar_t *p; + const wchar_t *p = start; - if (start >= end) - return (0); - p = start; while (p < end) { switch (*p++) { case L'r': @@ -1533,11 +1525,8 @@ is_nfs4_perms_w(const wchar_t *start, co static int is_nfs4_flags_w(const wchar_t *start, const wchar_t *end, int *permset) { - const wchar_t *p; + const wchar_t *p = start; - if (start >= end) - return (0); - p = start; while (p < end) { switch(*p++) { case L'f': @@ -1945,11 +1934,8 @@ ismode(const char *start, const char *en static int is_nfs4_perms(const char *start, const char *end, int *permset) { - const char *p; + const char *p = start; - if (start >= end) - return (0); - p = start; while (p < end) { switch (*p++) { case 'r': @@ -2011,11 +1997,8 @@ is_nfs4_perms(const char *start, const c static int is_nfs4_flags(const char *start, const char *end, int *permset) { - const char *p; + const char *p = start; - if (start >= end) - return (0); - p = start; while (p < end) { switch(*p++) { case 'f': Modified: vendor/libarchive/dist/libarchive/archive_entry.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.h Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_entry.h Wed Feb 15 20:00:36 2017 (r313781) @@ -509,6 +509,10 @@ __LA_DECL int archive_entry_acl_next_w( * ARCHIVE_ENTRY_ACL_STYLE_SOLARIS - Output only one colon after "other" and * "mask" entries. * + * Flags only for archive entries with NFSv4 ACL: + * ARCHIVE_ENTRY_ACL_STYLE_COMPACT - Do not output the minus character for + * unset permissions and flags in NFSv4 ACL permission and flag fields + * * Flags for for archive entries with POSIX.1e ACL or NFSv4 ACL: * ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID - Include extra numeric ID field in * each ACL entry. @@ -519,6 +523,7 @@ __LA_DECL int archive_entry_acl_next_w( #define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 0x00000002 #define ARCHIVE_ENTRY_ACL_STYLE_SOLARIS 0x00000004 #define ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA 0x00000008 +#define ARCHIVE_ENTRY_ACL_STYLE_COMPACT 0x00000010 __LA_DECL wchar_t *archive_entry_acl_to_text_w(struct archive_entry *, ssize_t * /* len */, int /* flags */); Modified: vendor/libarchive/dist/libarchive/archive_entry_acl.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_acl.3 Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_entry_acl.3 Wed Feb 15 20:00:36 2017 (r313781) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 27, 2016 +.Dd February 15, 2017 .Dt ARCHIVE_ENTRY_ACL 3 .Os .Sh NAME @@ -390,6 +390,13 @@ Prefix each default ACL entry with the w The mask and other ACLs don not contain a double colon. .El .Pp +The following flags are effecive only on NFSv4 ACL: +.Bl -tag -offset indent -compact -width ARCHIV +.It Dv ARCHIVE_ENTRY_ACL_STYLE_COMPACT +Do not output minus characters for unset permissions and flags in NFSv4 ACL +permission and flag fields. +.El +.Pp The following flags are effective on both POSIX.1e and NFSv4 ACL: .Bl -tag -offset indent -compact -width ARCHIV .It Dv ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID Modified: vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Wed Feb 15 20:00:36 2017 (r313781) @@ -618,9 +618,9 @@ setup_acls(struct archive_read_disk *a, /* * Translate system ACL permissions into libarchive internal structure */ -static struct { - int archive_perm; - int platform_perm; +static const struct { + const int archive_perm; + const int platform_perm; } acl_perm_map[] = { #if HAVE_SUN_ACL /* Solaris NFSv4 ACL permissions */ {ARCHIVE_ENTRY_ACL_EXECUTE, ACE_EXECUTE}, @@ -687,9 +687,9 @@ static struct { /* * Translate system NFSv4 inheritance flags into libarchive internal structure */ -static struct { - int archive_inherit; - int platform_inherit; +static const struct { + const int archive_inherit; + const int platform_inherit; } acl_inherit_map[] = { #if HAVE_SUN_ACL /* Solaris ACL inheritance flags */ {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, @@ -882,7 +882,7 @@ sun_acl_is_trivial(acl_t *acl, mode_t mo /* * POSIX.1e ACLs marked with ACL_IS_TRIVIAL are compatible with * FreeBSD acl_is_trivial_np(). On Solaris they have 4 entries, - * incuding mask. + * including mask. */ if (acl->acl_type == ACLENT_T) { if (acl->acl_cnt == 4) Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Wed Feb 15 20:00:36 2017 (r313781) @@ -452,26 +452,38 @@ process_extra(struct archive_read *a, co /* Zip64 extended information extra field. */ zip_entry->flags |= LA_USED_ZIP64; if (zip_entry->uncompressed_size == 0xffffffff) { - if (datasize < 8) - break; - zip_entry->uncompressed_size = - archive_le64dec(p + offset); + uint64_t t = 0; + if (datasize < 8 + || (t = archive_le64dec(p + offset)) > INT64_MAX) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Malformed 64-bit uncompressed size"); + return ARCHIVE_FAILED; + } + zip_entry->uncompressed_size = t; offset += 8; datasize -= 8; } if (zip_entry->compressed_size == 0xffffffff) { - if (datasize < 8) - break; - zip_entry->compressed_size = - archive_le64dec(p + offset); + uint64_t t = 0; + if (datasize < 8 + || (t = archive_le64dec(p + offset)) > INT64_MAX) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Malformed 64-bit compressed size"); + return ARCHIVE_FAILED; + } + zip_entry->compressed_size = t; offset += 8; datasize -= 8; } if (zip_entry->local_header_offset == 0xffffffff) { - if (datasize < 8) - break; - zip_entry->local_header_offset = - archive_le64dec(p + offset); + uint64_t t = 0; + if (datasize < 8 + || (t = archive_le64dec(p + offset)) > INT64_MAX) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Malformed 64-bit local header offset"); + return ARCHIVE_FAILED; + } + zip_entry->local_header_offset = t; offset += 8; datasize -= 8; } @@ -1156,11 +1168,18 @@ zip_read_data_none(struct archive_read * || (zip->hctx_valid && zip->entry->aes_extra.vendor == AES_VENDOR_AE_2))) { if (zip->entry->flags & LA_USED_ZIP64) { + uint64_t compressed, uncompressed; zip->entry->crc32 = archive_le32dec(p + 4); - zip->entry->compressed_size = - archive_le64dec(p + 8); - zip->entry->uncompressed_size = - archive_le64dec(p + 16); + compressed = archive_le64dec(p + 8); + uncompressed = archive_le64dec(p + 16); + if (compressed > INT64_MAX || uncompressed > INT64_MAX) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Overflow of 64-bit file sizes"); + return ARCHIVE_FAILED; + } + zip->entry->compressed_size = compressed; + zip->entry->uncompressed_size = uncompressed; zip->unconsumed = 24; } else { zip->entry->crc32 = archive_le32dec(p + 4); @@ -1437,9 +1456,18 @@ zip_read_data_deflate(struct archive_rea zip->unconsumed = 4; } if (zip->entry->flags & LA_USED_ZIP64) { + uint64_t compressed, uncompressed; zip->entry->crc32 = archive_le32dec(p); - zip->entry->compressed_size = archive_le64dec(p + 4); - zip->entry->uncompressed_size = archive_le64dec(p + 12); + compressed = archive_le64dec(p + 4); + uncompressed = archive_le64dec(p + 12); + if (compressed > INT64_MAX || uncompressed > INT64_MAX) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Overflow of 64-bit file sizes"); + return ARCHIVE_FAILED; + } + zip->entry->compressed_size = compressed; + zip->entry->uncompressed_size = uncompressed; zip->unconsumed += 20; } else { zip->entry->crc32 = archive_le32dec(p); Modified: vendor/libarchive/dist/libarchive/archive_write_disk_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_acl.c Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_write_disk_acl.c Wed Feb 15 20:00:36 2017 (r313781) @@ -101,7 +101,7 @@ archive_write_disk_set_acls(struct archi ACL_TYPE_DEFAULT, ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default"); #endif /* !HAVE_SUN_ACL */ - /* Simultaeous POSIX.1e and NFSv4 is not supported */ + /* Simultaneous POSIX.1e and NFSv4 is not supported */ return (ret); } #endif /* !HAVE_DARWIN_ACL */ @@ -119,9 +119,9 @@ archive_write_disk_set_acls(struct archi /* * Translate system ACL permissions into libarchive internal structure */ -static struct { - int archive_perm; - int platform_perm; +static const struct { + const int archive_perm; + const int platform_perm; } acl_perm_map[] = { #if HAVE_SUN_ACL /* Solaris NFSv4 ACL permissions */ {ARCHIVE_ENTRY_ACL_EXECUTE, ACE_EXECUTE}, @@ -188,9 +188,9 @@ static struct { /* * Translate system NFSv4 inheritance flags into libarchive internal structure */ -static struct { - int archive_inherit; - int platform_inherit; +static const struct { + const int archive_inherit; + const int platform_inherit; } acl_inherit_map[] = { #if HAVE_SUN_ACL /* Solaris NFSv4 inheritance flags */ {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c Wed Feb 15 20:00:36 2017 (r313781) @@ -1166,7 +1166,8 @@ archive_write_pax_header(struct archive_ if ((acl_types & ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { ret = add_pax_acl(a, entry_original, pax, ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID | - ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA); + ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA | + ARCHIVE_ENTRY_ACL_STYLE_COMPACT); if (ret == ARCHIVE_FATAL) return (ARCHIVE_FATAL); } Modified: vendor/libarchive/dist/libarchive/test/test_acl_pax_nfs4.tar.uu ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_acl_pax_nfs4.tar.uu Wed Feb 15 19:50:26 2017 (r313780) +++ vendor/libarchive/dist/libarchive/test/test_acl_pax_nfs4.tar.uu Wed Feb 15 20:00:36 2017 (r313781) @@ -1,8 +1,8 @@ begin 644 test_acl_pax_nfs4.tar M4&%X2&5A9&5R+V9I;&4````````````````````````````````````````` M```````````````````````````````````````````````````````````` -M`````````````#`P,#``````````````````````````````` +M`````````````#`P,#``````````````````````````````` M```````````````````````````````````````````````````````````` M``````````````````````````````````````````!U'`M+6%!4E=C0V]S.BTM+2TM+2TZ86QL;W``````````````````````` +M,#`P,C4V(#`P,#`P,#`P,#`P(#`Q,C`Q,@`@>``````````````````````` M```````````````````````````````````````````````````````````` M``````````````````````````````````````````````````!U#HZ9&5N>3HW."QG``````````````` +M`#`P,#`P,#`P,C8R(#`P,#`P,#`P,#`P(#`Q,C`P-P`@>``````````````` M```````````````````````````````````````````````````````````` M``````````````````````````````````````````````````````````!U M'`M+6%!4E=C0V]S.BTM+2TM+2TZ86QL;W6]N94`Z'!A05)78T-O Delivered-To: svn-src-vendor@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 36217CE0712; Thu, 16 Feb 2017 01:44:58 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 10B28D9B; Thu, 16 Feb 2017 01:44:57 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1G1ivRh049332; Thu, 16 Feb 2017 01:44:57 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1G1ivE9049329; Thu, 16 Feb 2017 01:44:57 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201702160144.v1G1ivE9049329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Thu, 16 Feb 2017 01:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313786 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 01:44:58 -0000 Author: jpaetzel Date: Thu Feb 16 01:44:56 2017 New Revision: 313786 URL: https://svnweb.freebsd.org/changeset/base/313786 Log: 7500 Simplify dbuf_free_range by removing dn_unlisted_l0_blkid illumos/illumos-gate@653af1b809998570c7e89fe7a0d3f90992bf0216 https://github.com/illumos/illumos-gate/commit/653af1b809998570c7e89fe7a0d3f90992bf0216 https://www.illumos.org/issues/7500 With the integration of: commit 0f6d88aded0d165f5954688a9b13bac76c38da84 Author: Alex Reece Date: Sat Jul 26 13:40:04 2014 -0800 4873 zvol unmap calls can take a very long time for larger datasets the dnode's dn_bufs field was changed from a list to a tree. As a result, the dn_unlisted_l0_blkid field is no longer necessary. Author: Stephen Blinick Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Approved by: Gordon Ross Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Feb 15 23:49:28 2017 (r313785) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Thu Feb 16 01:44:56 2017 (r313786) @@ -49,12 +49,6 @@ uint_t zfs_dbuf_evict_key; -/* - * Number of times that zfs_free_range() took the slow path while doing - * a zfs receive. A nonzero value indicates a potential performance problem. - */ -uint64_t zfs_free_range_recv_miss; - static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx); static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx); @@ -1220,9 +1214,6 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) * Evict (if its unreferenced) or clear (if its referenced) any level-0 * data blocks in the free range, so that any future readers will find * empty blocks. - * - * This is a no-op if the dataset is in the middle of an incremental - * receive; see comment below for details. */ void dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, @@ -1232,10 +1223,9 @@ dbuf_free_range(dnode_t *dn, uint64_t st dmu_buf_impl_t *db, *db_next; uint64_t txg = tx->tx_txg; avl_index_t where; - boolean_t freespill = - (start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID); - if (end_blkid > dn->dn_maxblkid && !freespill) + if (end_blkid > dn->dn_maxblkid && + !(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID)) end_blkid = dn->dn_maxblkid; dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid); @@ -1244,29 +1234,9 @@ dbuf_free_range(dnode_t *dn, uint64_t st db_search.db_state = DB_SEARCH; mutex_enter(&dn->dn_dbufs_mtx); - if (start_blkid >= dn->dn_unlisted_l0_blkid && !freespill) { - /* There can't be any dbufs in this range; no need to search. */ -#ifdef DEBUG - db = avl_find(&dn->dn_dbufs, &db_search, &where); - ASSERT3P(db, ==, NULL); - db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER); - ASSERT(db == NULL || db->db_level > 0); -#endif - mutex_exit(&dn->dn_dbufs_mtx); - return; - } else if (dmu_objset_is_receiving(dn->dn_objset)) { - /* - * If we are receiving, we expect there to be no dbufs in - * the range to be freed, because receive modifies each - * block at most once, and in offset order. If this is - * not the case, it can lead to performance problems, - * so note that we unexpectedly took the slow path. - */ - atomic_inc_64(&zfs_free_range_recv_miss); - } - db = avl_find(&dn->dn_dbufs, &db_search, &where); ASSERT3P(db, ==, NULL); + db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER); for (; db != NULL; db = db_next) { @@ -2283,9 +2253,7 @@ dbuf_create(dnode_t *dn, uint8_t level, return (odb); } avl_add(&dn->dn_dbufs, db); - if (db->db_level == 0 && db->db_blkid >= - dn->dn_unlisted_l0_blkid) - dn->dn_unlisted_l0_blkid = db->db_blkid + 1; + db->db_state = DB_UNCACHED; mutex_exit(&dn->dn_dbufs_mtx); arc_space_consume(sizeof (dmu_buf_impl_t), ARC_SPACE_OTHER); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Wed Feb 15 23:49:28 2017 (r313785) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Thu Feb 16 01:44:56 2017 (r313786) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -151,7 +151,6 @@ dnode_cons(void *arg, void *unused, int dn->dn_id_flags = 0; dn->dn_dbufs_count = 0; - dn->dn_unlisted_l0_blkid = 0; avl_create(&dn->dn_dbufs, dbuf_compare, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_link)); @@ -204,7 +203,6 @@ dnode_dest(void *arg, void *unused) ASSERT0(dn->dn_id_flags); ASSERT0(dn->dn_dbufs_count); - ASSERT0(dn->dn_unlisted_l0_blkid); avl_destroy(&dn->dn_dbufs); } @@ -522,7 +520,6 @@ dnode_destroy(dnode_t *dn) dn->dn_newuid = 0; dn->dn_newgid = 0; dn->dn_id_flags = 0; - dn->dn_unlisted_l0_blkid = 0; dmu_zfetch_fini(&dn->dn_zfetch); kmem_cache_free(dnode_cache, dn); @@ -758,7 +755,6 @@ dnode_move_impl(dnode_t *odn, dnode_t *n ASSERT(avl_is_empty(&ndn->dn_dbufs)); avl_swap(&ndn->dn_dbufs, &odn->dn_dbufs); ndn->dn_dbufs_count = odn->dn_dbufs_count; - ndn->dn_unlisted_l0_blkid = odn->dn_unlisted_l0_blkid; ndn->dn_bonus = odn->dn_bonus; ndn->dn_have_spill = odn->dn_have_spill; ndn->dn_zio = odn->dn_zio; @@ -791,7 +787,6 @@ dnode_move_impl(dnode_t *odn, dnode_t *n avl_create(&odn->dn_dbufs, dbuf_compare, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_link)); odn->dn_dbufs_count = 0; - odn->dn_unlisted_l0_blkid = 0; odn->dn_bonus = NULL; odn->dn_zfetch.zf_dnode = NULL; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Wed Feb 15 23:49:28 2017 (r313785) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Thu Feb 16 01:44:56 2017 (r313786) @@ -195,8 +195,6 @@ struct dnode { /* protected by dn_dbufs_mtx; declared here to fill 32-bit hole */ uint32_t dn_dbufs_count; /* count of dn_dbufs */ - /* There are no level-0 blocks of this blkid or higher in dn_dbufs */ - uint64_t dn_unlisted_l0_blkid; /* protected by os_lock: */ list_node_t dn_dirty_link[TXG_SIZE]; /* next on dataset's dirty */ From owner-svn-src-vendor@freebsd.org Fri Feb 17 15:00:14 2017 Return-Path: Delivered-To: svn-src-vendor@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 EAE8CCE3F5A; Fri, 17 Feb 2017 15:00:14 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9EE2F1A69; Fri, 17 Feb 2017 15:00:14 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HF0DQk058872; Fri, 17 Feb 2017 15:00:13 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HF0Dag058871; Fri, 17 Feb 2017 15:00:13 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201702171500.v1HF0Dag058871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Fri, 17 Feb 2017 15:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313876 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 15:00:15 -0000 Author: jpaetzel Date: Fri Feb 17 15:00:13 2017 New Revision: 313876 URL: https://svnweb.freebsd.org/changeset/base/313876 Log: 7504 kmem_reap hangs spa_sync and administrative tasks illumos/illumos-gate@405a5a0f5c3ab36cb76559467d1a62ba648bd809 https://github.com/illumos/illumos-gate/commit/405a5a0f5c3ab36cb76559467d1a62ba648bd80 https://www.illumos.org/issues/7504 We see long spa_sync(). We are waiting to hold dp_config_rwlock for writer. Some other thread holds dp_config_rwlock for reader, then calls arc_get_data_buf(), which finds that arc_is_overflowing()==B_TRUE. So it waits (while holding dp_config_rwlock for reader) for arc_reclaim_thread to signal arc_reclaim_waiters_cv. Before signaling, arc_reclaim_thread does arc_kmem_reap_now(), which takes ~seconds. Author: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Prakash Surya Approved by: Dan McDonald Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Fri Feb 17 14:55:59 2017 (r313875) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Fri Feb 17 15:00:13 2017 (r313876) @@ -3748,7 +3748,6 @@ arc_reclaim_thread(void) mutex_enter(&arc_reclaim_lock); while (!arc_reclaim_thread_exit) { - int64_t free_memory = arc_available_memory(); uint64_t evicted = 0; /* @@ -3767,6 +3766,14 @@ arc_reclaim_thread(void) mutex_exit(&arc_reclaim_lock); + /* + * We call arc_adjust() before (possibly) calling + * arc_kmem_reap_now(), so that we can wake up + * arc_get_data_buf() sooner. + */ + evicted = arc_adjust(); + + int64_t free_memory = arc_available_memory(); if (free_memory < 0) { arc_no_grow = B_TRUE; @@ -3800,8 +3807,6 @@ arc_reclaim_thread(void) arc_no_grow = B_FALSE; } - evicted = arc_adjust(); - mutex_enter(&arc_reclaim_lock); /* From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:35:12 2017 Return-Path: Delivered-To: svn-src-vendor@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 17899CE313D; Fri, 17 Feb 2017 19:35:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BCE391DEA; Fri, 17 Feb 2017 19:35:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJZAGG074684; Fri, 17 Feb 2017 19:35:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJZ8hx074664; Fri, 17 Feb 2017 19:35:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171935.v1HJZ8hx074664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313881 - in vendor/llvm/dist: docs include/llvm/LTO/legacy lib/CodeGen/SelectionDAG lib/LTO lib/Target/AArch64 lib/Target/ARM lib/Transforms/Instrumentation lib/Transforms/Utils test/C... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:35:12 -0000 Author: dim Date: Fri Feb 17 19:35:08 2017 New Revision: 313881 URL: https://svnweb.freebsd.org/changeset/base/313881 Log: Vendor import of llvm release_40 branch r295380: https://llvm.org/svn/llvm-project/llvm/branches/release_40@295380 Added: vendor/llvm/dist/test/CodeGen/X86/dag-update-nodetomatch.ll vendor/llvm/dist/test/CodeGen/X86/pr31956.ll vendor/llvm/dist/test/Transforms/LoopUnroll/runtime-li.ll Modified: vendor/llvm/dist/docs/Extensions.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.td vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ThreadSanitizer.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.ll vendor/llvm/dist/test/CodeGen/AArch64/swifterror.ll vendor/llvm/dist/test/CodeGen/AArch64/swiftself.ll vendor/llvm/dist/test/CodeGen/ARM/swifterror.ll vendor/llvm/dist/test/CodeGen/ARM/swiftself.ll vendor/llvm/dist/test/CodeGen/X86/swifterror.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/basic.ll vendor/llvm/dist/test/Instrumentation/ThreadSanitizer/tsan_basic.ll Modified: vendor/llvm/dist/docs/Extensions.rst ============================================================================== --- vendor/llvm/dist/docs/Extensions.rst Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/docs/Extensions.rst Fri Feb 17 19:35:08 2017 (r313881) @@ -61,7 +61,7 @@ types ``IMAGE_REL_I386_SECREL`` (32-bit) the target. It corresponds to the COFF relocation types ``IMAGE_REL_I386_SECTION`` (32-bit) or ``IMAGE_REL_AMD64_SECTION`` (64-bit). -.. code-block:: gas +.. code-block:: none .section .debug$S,"rn" .long 4 Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/docs/LangRef.rst Fri Feb 17 19:35:08 2017 (r313881) @@ -3997,7 +3997,7 @@ DIFile ``DIFile`` nodes represent files. The ``filename:`` can include slashes. -.. code-block:: llvm +.. code-block:: none !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir", checksumkind: CSK_MD5, Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Fri Feb 17 19:35:08 2017 (r313881) @@ -61,6 +61,9 @@ Non-comprehensive list of changes in thi with LLVM option -adce-remove-loops when the loop body otherwise has no live operations. + * The llvm-cov tool can now export coverage data as json. Its html output mode + has also improved. + * ... next change ... .. NOTE @@ -81,6 +84,37 @@ Non-comprehensive list of changes in thi * Significant build-time and binary-size improvements when compiling with debug info (-g). +LLVM Coroutines +--------------- + +Experimental support for :doc:`Coroutines` was added, which can be enabled +with ``-enable-coroutines`` in ``opt`` command tool or using +``addCoroutinePassesToExtensionPoints`` API when building the optimization +pipeline. + +For more information on LLVM Coroutines and the LLVM implementation, see +`2016 LLVM Developers’ Meeting talk on LLVM Coroutines +`_. + +Regcall and Vectorcall Calling Conventions +-------------------------------------------------- + +Support was added for _regcall calling convention. +Existing __vectorcall calling convention support was extended to include +correct handling of HVAs. + +The __vectorcall calling convention was introduced by Microsoft to +enhance register usage when passing parameters. +For more information please read `__vectorcall documentation +`_. + +The __regcall calling convention was introduced by Intel to +optimize parameter transfer on function call. +This calling convention ensures that as many values as possible are +passed or returned in registers. +For more information please read `__regcall documentation +`_. + Code Generation Testing ----------------------- @@ -258,6 +292,21 @@ External Open Source Projects Using LLVM * A project... +LDC - the LLVM-based D compiler +------------------------------- + +`D `_ is a language with C-like syntax and static typing. It +pragmatically combines efficiency, control, and modeling power, with safety and +programmer productivity. D supports powerful concepts like Compile-Time Function +Execution (CTFE) and Template Meta-Programming, provides an innovative approach +to concurrency and offers many classical paradigms. + +`LDC `_ uses the frontend from the reference compiler +combined with LLVM as backend to produce efficient native code. LDC targets +x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM +and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64 +are underway. + Additional Information ====================== Modified: vendor/llvm/dist/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h ============================================================================== --- vendor/llvm/dist/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h Fri Feb 17 19:35:08 2017 (r313881) @@ -31,6 +31,23 @@ class StringRef; class LLVMContext; class TargetMachine; +/// Wrapper around MemoryBufferRef, owning the identifier +class ThinLTOBuffer { + std::string OwnedIdentifier; + StringRef Buffer; + +public: + ThinLTOBuffer(StringRef Buffer, StringRef Identifier) + : OwnedIdentifier(Identifier), Buffer(Buffer) {} + + MemoryBufferRef getMemBuffer() const { + return MemoryBufferRef(Buffer, + {OwnedIdentifier.c_str(), OwnedIdentifier.size()}); + } + StringRef getBuffer() const { return Buffer; } + StringRef getBufferIdentifier() const { return OwnedIdentifier; } +}; + /// Helper to gather options relevant to the target machine creation struct TargetMachineBuilder { Triple TheTriple; @@ -280,7 +297,7 @@ private: /// Vector holding the input buffers containing the bitcode modules to /// process. - std::vector Modules; + std::vector Modules; /// Set of symbols that need to be preserved outside of the set of bitcode /// files. Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -13072,9 +13072,15 @@ SDValue DAGCombiner::createBuildVecShuff !TLI.isOperationLegal(ISD::VECTOR_SHUFFLE, InVT1)) return SDValue(); - if (InVT1 != InVT2) + // Legalizing INSERT_SUBVECTOR is tricky - you basically have to + // lower it back into a BUILD_VECTOR. So if the inserted type is + // illegal, don't even try. + if (InVT1 != InVT2) { + if (!TLI.isTypeLegal(InVT2)) + return SDValue(); VecIn2 = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, InVT1, DAG.getUNDEF(InVT1), VecIn2, ZeroIdx); + } ShuffleNumElems = NumElems * 2; } else { // Both VecIn1 and VecIn2 are wider than the output, and VecIn2 is wider Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -502,8 +502,17 @@ void InstrEmitter::EmitSubregNode(SDNode const TargetRegisterClass *TRC = TLI->getRegClassFor(Node->getSimpleValueType(0)); - unsigned VReg = getVR(Node->getOperand(0), VRBaseMap); - MachineInstr *DefMI = MRI->getVRegDef(VReg); + unsigned Reg; + MachineInstr *DefMI; + RegisterSDNode *R = dyn_cast(Node->getOperand(0)); + if (R && TargetRegisterInfo::isPhysicalRegister(R->getReg())) { + Reg = R->getReg(); + DefMI = nullptr; + } else { + Reg = getVR(Node->getOperand(0), VRBaseMap); + DefMI = MRI->getVRegDef(Reg); + } + unsigned SrcReg, DstReg, DefSubIdx; if (DefMI && TII->isCoalescableExtInstr(*DefMI, SrcReg, DstReg, DefSubIdx) && @@ -519,20 +528,26 @@ void InstrEmitter::EmitSubregNode(SDNode TII->get(TargetOpcode::COPY), VRBase).addReg(SrcReg); MRI->clearKillFlags(SrcReg); } else { - // VReg may not support a SubIdx sub-register, and we may need to + // Reg may not support a SubIdx sub-register, and we may need to // constrain its register class or issue a COPY to a compatible register // class. - VReg = ConstrainForSubReg(VReg, SubIdx, - Node->getOperand(0).getSimpleValueType(), - Node->getDebugLoc()); + if (TargetRegisterInfo::isVirtualRegister(Reg)) + Reg = ConstrainForSubReg(Reg, SubIdx, + Node->getOperand(0).getSimpleValueType(), + Node->getDebugLoc()); // Create the destreg if it is missing. if (VRBase == 0) VRBase = MRI->createVirtualRegister(TRC); // Create the extract_subreg machine instruction. - BuildMI(*MBB, InsertPos, Node->getDebugLoc(), - TII->get(TargetOpcode::COPY), VRBase).addReg(VReg, 0, SubIdx); + MachineInstrBuilder CopyMI = + BuildMI(*MBB, InsertPos, Node->getDebugLoc(), + TII->get(TargetOpcode::COPY), VRBase); + if (TargetRegisterInfo::isVirtualRegister(Reg)) + CopyMI.addReg(Reg, 0, SubIdx); + else + CopyMI.addReg(TRI->getSubReg(Reg, SubIdx)); } } else if (Opc == TargetOpcode::INSERT_SUBREG || Opc == TargetOpcode::SUBREG_TO_REG) { Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -5832,6 +5832,15 @@ void SelectionDAGBuilder::LowerCallTo(Im const Value *SwiftErrorVal = nullptr; const TargetLowering &TLI = DAG.getTargetLoweringInfo(); + + // We can't tail call inside a function with a swifterror argument. Lowering + // does not support this yet. It would have to move into the swifterror + // register before the call. + auto *Caller = CS.getInstruction()->getParent()->getParent(); + if (TLI.supportSwiftError() && + Caller->getAttributes().hasAttrSomewhere(Attribute::SwiftError)) + isTailCall = false; + for (ImmutableCallSite::arg_iterator i = CS.arg_begin(), e = CS.arg_end(); i != e; ++i) { const Value *V = *i; Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -2782,14 +2782,15 @@ struct MatchScope { /// for this. class MatchStateUpdater : public SelectionDAG::DAGUpdateListener { - SmallVectorImpl > &RecordedNodes; - SmallVectorImpl &MatchScopes; + SDNode **NodeToMatch; + SmallVectorImpl> &RecordedNodes; + SmallVectorImpl &MatchScopes; public: - MatchStateUpdater(SelectionDAG &DAG, - SmallVectorImpl > &RN, - SmallVectorImpl &MS) : - SelectionDAG::DAGUpdateListener(DAG), - RecordedNodes(RN), MatchScopes(MS) { } + MatchStateUpdater(SelectionDAG &DAG, SDNode **NodeToMatch, + SmallVectorImpl> &RN, + SmallVectorImpl &MS) + : SelectionDAG::DAGUpdateListener(DAG), NodeToMatch(NodeToMatch), + RecordedNodes(RN), MatchScopes(MS) {} void NodeDeleted(SDNode *N, SDNode *E) override { // Some early-returns here to avoid the search if we deleted the node or @@ -2799,6 +2800,9 @@ public: // update listener during matching a complex patterns. if (!E || E->isMachineOpcode()) return; + // Check if NodeToMatch was updated. + if (N == *NodeToMatch) + *NodeToMatch = E; // Performing linear search here does not matter because we almost never // run this code. You'd have to have a CSE during complex pattern // matching. @@ -3091,7 +3095,7 @@ void SelectionDAGISel::SelectCodeCommon( // consistent. std::unique_ptr MSU; if (ComplexPatternFuncMutatesDAG()) - MSU.reset(new MatchStateUpdater(*CurDAG, RecordedNodes, + MSU.reset(new MatchStateUpdater(*CurDAG, &NodeToMatch, RecordedNodes, MatchScopes)); if (!CheckComplexPattern(NodeToMatch, RecordedNodes[RecNo].second, Modified: vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp ============================================================================== --- vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -150,13 +150,13 @@ static void computePrevailingCopies( } static StringMap -generateModuleMap(const std::vector &Modules) { +generateModuleMap(const std::vector &Modules) { StringMap ModuleMap; for (auto &ModuleBuffer : Modules) { assert(ModuleMap.find(ModuleBuffer.getBufferIdentifier()) == ModuleMap.end() && "Expect unique Buffer Identifier"); - ModuleMap[ModuleBuffer.getBufferIdentifier()] = ModuleBuffer; + ModuleMap[ModuleBuffer.getBufferIdentifier()] = ModuleBuffer.getMemBuffer(); } return ModuleMap; } @@ -522,13 +522,13 @@ static void initTMBuilder(TargetMachineB } // end anonymous namespace void ThinLTOCodeGenerator::addModule(StringRef Identifier, StringRef Data) { - MemoryBufferRef Buffer(Data, Identifier); + ThinLTOBuffer Buffer(Data, Identifier); if (Modules.empty()) { // First module added, so initialize the triple and some options LLVMContext Context; StringRef TripleStr; - ErrorOr TripleOrErr = - expectedToErrorOrAndEmitErrors(Context, getBitcodeTargetTriple(Buffer)); + ErrorOr TripleOrErr = expectedToErrorOrAndEmitErrors( + Context, getBitcodeTargetTriple(Buffer.getMemBuffer())); if (TripleOrErr) TripleStr = *TripleOrErr; Triple TheTriple(TripleStr); @@ -538,8 +538,8 @@ void ThinLTOCodeGenerator::addModule(Str else { LLVMContext Context; StringRef TripleStr; - ErrorOr TripleOrErr = - expectedToErrorOrAndEmitErrors(Context, getBitcodeTargetTriple(Buffer)); + ErrorOr TripleOrErr = expectedToErrorOrAndEmitErrors( + Context, getBitcodeTargetTriple(Buffer.getMemBuffer())); if (TripleOrErr) TripleStr = *TripleOrErr; assert(TMBuilder.TheTriple.str() == TripleStr && @@ -588,7 +588,8 @@ std::unique_ptr Thin uint64_t NextModuleId = 0; for (auto &ModuleBuffer : Modules) { Expected> ObjOrErr = - object::ModuleSummaryIndexObjectFile::create(ModuleBuffer); + object::ModuleSummaryIndexObjectFile::create( + ModuleBuffer.getMemBuffer()); if (!ObjOrErr) { // FIXME diagnose logAllUnhandledErrors( @@ -852,8 +853,9 @@ void ThinLTOCodeGenerator::run() { Context.setDiscardValueNames(LTODiscardValueNames); // Parse module now - auto TheModule = loadModuleFromBuffer(ModuleBuffer, Context, false, - /*IsImporting*/ false); + auto TheModule = + loadModuleFromBuffer(ModuleBuffer.getMemBuffer(), Context, false, + /*IsImporting*/ false); // CodeGen auto OutputBuffer = codegen(*TheModule); @@ -943,8 +945,8 @@ void ThinLTOCodeGenerator::run() { std::iota(ModulesOrdering.begin(), ModulesOrdering.end(), 0); std::sort(ModulesOrdering.begin(), ModulesOrdering.end(), [&](int LeftIndex, int RightIndex) { - auto LSize = Modules[LeftIndex].getBufferSize(); - auto RSize = Modules[RightIndex].getBufferSize(); + auto LSize = Modules[LeftIndex].getBuffer().size(); + auto RSize = Modules[RightIndex].getBuffer().size(); return LSize > RSize; }); @@ -996,8 +998,9 @@ void ThinLTOCodeGenerator::run() { } // Parse module now - auto TheModule = loadModuleFromBuffer(ModuleBuffer, Context, false, - /*IsImporting*/ false); + auto TheModule = + loadModuleFromBuffer(ModuleBuffer.getMemBuffer(), Context, false, + /*IsImporting*/ false); // Save temps: original file. saveTempBitcode(*TheModule, SaveTempsDir, count, ".0.original.bc"); Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.td ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.td Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.td Fri Feb 17 19:35:08 2017 (r313881) @@ -91,7 +91,7 @@ def RetCC_AArch64_AAPCS : CallingConv<[ CCIfType<[v2f32], CCBitConvertToType>, CCIfType<[v2f64, v4f32], CCBitConvertToType>, - CCIfSwiftError>>, + CCIfSwiftError>>, // Big endian vectors must be passed as if they were 1-element vectors so that // their lanes are in a consistent order. @@ -138,8 +138,8 @@ def CC_AArch64_DarwinPCS : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is passed in X19. - CCIfSwiftError>>, + // A SwiftError is passed in X21. + CCIfSwiftError>>, CCIfConsecutiveRegs>, @@ -289,7 +289,7 @@ def CSR_AArch64_AAPCS : CalleeSavedRegs< def CSR_AArch64_AAPCS_ThisReturn : CalleeSavedRegs<(add CSR_AArch64_AAPCS, X0)>; def CSR_AArch64_AAPCS_SwiftError - : CalleeSavedRegs<(sub CSR_AArch64_AAPCS, X19)>; + : CalleeSavedRegs<(sub CSR_AArch64_AAPCS, X21)>; // The function used by Darwin to obtain the address of a thread-local variable // guarantees more than a normal AAPCS function. x16 and x17 are used on the Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -3155,7 +3155,8 @@ AArch64TargetLowering::LowerCall(CallLow } if (VA.isRegLoc()) { - if (realArgIdx == 0 && Flags.isReturned() && Outs[0].VT == MVT::i64) { + if (realArgIdx == 0 && Flags.isReturned() && !Flags.isSwiftSelf() && + Outs[0].VT == MVT::i64) { assert(VA.getLocVT() == MVT::i64 && "unexpected calling convention register assignment"); assert(!Ins.empty() && Ins[0].VT == MVT::i64 && Modified: vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td Fri Feb 17 19:35:08 2017 (r313881) @@ -26,8 +26,8 @@ def CC_ARM_APCS : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is passed in R6. - CCIfSwiftError>>, + // A SwiftError is passed in R8. + CCIfSwiftError>>, // Handle all vector types as either f64 or v2f64. CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>, @@ -51,8 +51,8 @@ def RetCC_ARM_APCS : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is returned in R6. - CCIfSwiftError>>, + // A SwiftError is returned in R8. + CCIfSwiftError>>, // Handle all vector types as either f64 or v2f64. CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>, @@ -166,8 +166,8 @@ def CC_ARM_AAPCS : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is passed in R6. - CCIfSwiftError>>, + // A SwiftError is passed in R8. + CCIfSwiftError>>, CCIfType<[f64, v2f64], CCCustom<"CC_ARM_AAPCS_Custom_f64">>, CCIfType<[f32], CCBitConvertToType>, @@ -182,8 +182,8 @@ def RetCC_ARM_AAPCS : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is returned in R6. - CCIfSwiftError>>, + // A SwiftError is returned in R8. + CCIfSwiftError>>, CCIfType<[f64, v2f64], CCCustom<"RetCC_ARM_AAPCS_Custom_f64">>, CCIfType<[f32], CCBitConvertToType>, @@ -206,8 +206,8 @@ def CC_ARM_AAPCS_VFP : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is passed in R6. - CCIfSwiftError>>, + // A SwiftError is passed in R8. + CCIfSwiftError>>, // HFAs are passed in a contiguous block of registers, or on the stack CCIfConsecutiveRegs>, @@ -227,8 +227,8 @@ def RetCC_ARM_AAPCS_VFP : CallingConv<[ // Pass SwiftSelf in a callee saved register. CCIfSwiftSelf>>, - // A SwiftError is returned in R6. - CCIfSwiftError>>, + // A SwiftError is returned in R8. + CCIfSwiftError>>, CCIfType<[v2f64], CCAssignToReg<[Q0, Q1, Q2, Q3]>>, CCIfType<[f64], CCAssignToReg<[D0, D1, D2, D3, D4, D5, D6, D7]>>, @@ -267,8 +267,8 @@ def CSR_AAPCS_ThisReturn : CalleeSavedRe // Also save R7-R4 first to match the stack frame fixed spill areas. def CSR_iOS : CalleeSavedRegs<(add LR, R7, R6, R5, R4, (sub CSR_AAPCS, R9))>; -// R6 is used to pass swifterror, remove it from CSR. -def CSR_iOS_SwiftError : CalleeSavedRegs<(sub CSR_iOS, R6)>; +// R8 is used to pass swifterror, remove it from CSR. +def CSR_iOS_SwiftError : CalleeSavedRegs<(sub CSR_iOS, R8)>; def CSR_iOS_ThisReturn : CalleeSavedRegs<(add LR, R7, R6, R5, R4, (sub CSR_AAPCS_ThisReturn, R9))>; Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -1787,7 +1787,8 @@ ARMTargetLowering::LowerCall(TargetLower StackPtr, MemOpChains, Flags); } } else if (VA.isRegLoc()) { - if (realArgIdx == 0 && Flags.isReturned() && Outs[0].VT == MVT::i32) { + if (realArgIdx == 0 && Flags.isReturned() && !Flags.isSwiftSelf() && + Outs[0].VT == MVT::i32) { assert(VA.getLocVT() == MVT::i32 && "unexpected calling convention register assignment"); assert(!Ins.empty() && Ins[0].VT == MVT::i32 && Modified: vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -1013,7 +1013,9 @@ bool AddressSanitizer::isInterestingAllo (!ClSkipPromotableAllocas || !isAllocaPromotable(&AI)) && // inalloca allocas are not treated as static, and we don't want // dynamic alloca instrumentation for them as well. - !AI.isUsedWithInAlloca()); + !AI.isUsedWithInAlloca() && + // swifterror allocas are register promoted by ISel + !AI.isSwiftError()); ProcessedAllocas[&AI] = IsInteresting; return IsInteresting; @@ -1088,12 +1090,19 @@ Value *AddressSanitizer::isInterestingMe } } - // Do not instrument acesses from different address spaces; we cannot deal - // with them. if (PtrOperand) { + // Do not instrument acesses from different address spaces; we cannot deal + // with them. Type *PtrTy = cast(PtrOperand->getType()->getScalarType()); if (PtrTy->getPointerAddressSpace() != 0) return nullptr; + + // Ignore swifterror addresses. + // swifterror memory addresses are mem2reg promoted by instruction + // selection. As such they cannot have regular uses like an instrumentation + // function and it makes no sense to track them as memory. + if (PtrOperand->isSwiftError()) + return nullptr; } // Treat memory accesses to promotable allocas as non-interesting since they Modified: vendor/llvm/dist/lib/Transforms/Instrumentation/ThreadSanitizer.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Instrumentation/ThreadSanitizer.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Transforms/Instrumentation/ThreadSanitizer.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -488,6 +488,13 @@ bool ThreadSanitizer::instrumentLoadOrSt Value *Addr = IsWrite ? cast(I)->getPointerOperand() : cast(I)->getPointerOperand(); + + // swifterror memory addresses are mem2reg promoted by instruction selection. + // As such they cannot have regular uses like an instrumentation function and + // it makes no sense to track them as memory. + if (Addr->isSwiftError()) + return false; + int Idx = getMemoryAccessFuncIndex(Addr, DL); if (Idx < 0) return false; Modified: vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -189,11 +189,14 @@ const Loop* llvm::addClonedBlockToLoopIn assert(OriginalBB == OldLoop->getHeader() && "Header should be first in RPO"); + NewLoop = new Loop(); Loop *NewLoopParent = NewLoops.lookup(OldLoop->getParentLoop()); - assert(NewLoopParent && - "Expected parent loop before sub-loop in RPO"); - NewLoop = new Loop; - NewLoopParent->addChildLoop(NewLoop); + + if (NewLoopParent) + NewLoopParent->addChildLoop(NewLoop); + else + LI->addTopLevelLoop(NewLoop); + NewLoop->addBasicBlockToLoop(ClonedBB, *LI); return OldLoop; } else { Modified: vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp Fri Feb 17 19:35:08 2017 (r313881) @@ -302,17 +302,22 @@ static void CloneLoopBlocks(Loop *L, Val } NewLoopsMap NewLoops; - NewLoops[L] = NewLoop; + if (NewLoop) + NewLoops[L] = NewLoop; + else if (ParentLoop) + NewLoops[L] = ParentLoop; + // For each block in the original loop, create a new copy, // and update the value map with the newly created values. for (LoopBlocksDFS::RPOIterator BB = BlockBegin; BB != BlockEnd; ++BB) { BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, "." + suffix, F); NewBlocks.push_back(NewBB); - - if (NewLoop) { + + // If we're unrolling the outermost loop, there's no remainder loop, + // and this block isn't in a nested loop, then the new block is not + // in any loop. Otherwise, add it to loopinfo. + if (CreateRemainderLoop || LI->getLoopFor(*BB) != L || ParentLoop) addClonedBlockToLoopInfo(*BB, NewBB, LI, NewLoops); - } else if (ParentLoop) - ParentLoop->addBasicBlockToLoop(NewBB, *LI); VMap[*BB] = NewBB; if (Header == *BB) { Modified: vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.ll Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.ll Fri Feb 17 19:35:08 2017 (r313881) @@ -1,4 +1,5 @@ -; RUN: llc -mtriple=aarch64-linux-gnu -aarch64-enable-atomic-cfg-tidy=0 -disable-lsr -verify-machineinstrs -o - %s | FileCheck %s +; RUN: llc -mtriple=aarch64-linux-gnu -aarch64-enable-atomic-cfg-tidy=0 -disable-lsr -verify-machineinstrs -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOSTRICTALIGN %s +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+strict-align -aarch64-enable-atomic-cfg-tidy=0 -disable-lsr -verify-machineinstrs -o - %s | FileCheck --check-prefix=CHECK --check-prefix=STRICTALIGN %s ; This file contains tests for the AArch64 load/store optimizer. @@ -119,7 +120,7 @@ define void @load-pre-indexed-doubleword ; CHECK: ldr x{{[0-9]+}}, [x{{[0-9]+}}, #32]! entry: %a = getelementptr inbounds %struct.doubleword, %struct.doubleword* %ptr, i64 0, i32 1, i32 0 - %add = load i64, i64* %a, align 4 + %add = load i64, i64* %a, align 8 br label %bar bar: %c = getelementptr inbounds %struct.doubleword, %struct.doubleword* %ptr, i64 0, i32 1 @@ -132,7 +133,7 @@ define void @store-pre-indexed-doublewor ; CHECK: str x{{[0-9]+}}, [x{{[0-9]+}}, #32]! entry: %a = getelementptr inbounds %struct.doubleword, %struct.doubleword* %ptr, i64 0, i32 1, i32 0 - store i64 %val, i64* %a, align 4 + store i64 %val, i64* %a, align 8 br label %bar bar: %c = getelementptr inbounds %struct.doubleword, %struct.doubleword* %ptr, i64 0, i32 1 @@ -147,7 +148,7 @@ define void @load-pre-indexed-quadword(% ; CHECK: ldr q{{[0-9]+}}, [x{{[0-9]+}}, #32]! entry: %a = getelementptr inbounds %struct.quadword, %struct.quadword* %ptr, i64 0, i32 1, i32 0 - %add = load fp128, fp128* %a, align 4 + %add = load fp128, fp128* %a, align 16 br label %bar bar: %c = getelementptr inbounds %struct.quadword, %struct.quadword* %ptr, i64 0, i32 1 @@ -160,7 +161,7 @@ define void @store-pre-indexed-quadword( ; CHECK: str q{{[0-9]+}}, [x{{[0-9]+}}, #32]! entry: %a = getelementptr inbounds %struct.quadword, %struct.quadword* %ptr, i64 0, i32 1, i32 0 - store fp128 %val, fp128* %a, align 4 + store fp128 %val, fp128* %a, align 16 br label %bar bar: %c = getelementptr inbounds %struct.quadword, %struct.quadword* %ptr, i64 0, i32 1 @@ -203,7 +204,7 @@ define void @load-pre-indexed-double(%st ; CHECK: ldr d{{[0-9]+}}, [x{{[0-9]+}}, #32]! entry: %a = getelementptr inbounds %struct.double, %struct.double* %ptr, i64 0, i32 1, i32 0 - %add = load double, double* %a, align 4 + %add = load double, double* %a, align 8 br label %bar bar: %c = getelementptr inbounds %struct.double, %struct.double* %ptr, i64 0, i32 1 @@ -216,7 +217,7 @@ define void @store-pre-indexed-double(%s ; CHECK: str d{{[0-9]+}}, [x{{[0-9]+}}, #32]! entry: %a = getelementptr inbounds %struct.double, %struct.double* %ptr, i64 0, i32 1, i32 0 - store double %val, double* %a, align 4 + store double %val, double* %a, align 8 br label %bar bar: %c = getelementptr inbounds %struct.double, %struct.double* %ptr, i64 0, i32 1 @@ -1340,7 +1341,8 @@ end: define void @merge_zr32(i32* %p) { ; CHECK-LABEL: merge_zr32: ; CHECK: // %entry -; CHECK-NEXT: str xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: str xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] ; CHECK-NEXT: ret entry: store i32 0, i32* %p @@ -1349,11 +1351,13 @@ entry: ret void } -; Same sa merge_zr32 but the merged stores should also get paried. +; Same as merge_zr32 but the merged stores should also get paried. define void @merge_zr32_2(i32* %p) { ; CHECK-LABEL: merge_zr32_2: ; CHECK: // %entry -; CHECK-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}, #8] ; CHECK-NEXT: ret entry: store i32 0, i32* %p @@ -1370,7 +1374,11 @@ entry: define void @merge_zr32_2_offset(i32* %p) { ; CHECK-LABEL: merge_zr32_2_offset: ; CHECK: // %entry -; CHECK-NEXT: stp xzr, xzr, [x{{[0-9]+}}, #504] +; NOSTRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}, #504] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #504] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #508] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #512] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #516] ; CHECK-NEXT: ret entry: %p0 = getelementptr i32, i32* %p, i32 126 @@ -1390,8 +1398,12 @@ entry: define void @no_merge_zr32_2_offset(i32* %p) { ; CHECK-LABEL: no_merge_zr32_2_offset: ; CHECK: // %entry -; CHECK-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 -; CHECK-NEXT: str q[[REG]], [x{{[0-9]+}}, #4096] +; NOSTRICTALIGN-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 +; NOSTRICTALIGN-NEXT: str q[[REG]], [x{{[0-9]+}}, #4096] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #4096] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #4100] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #4104] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #4108] ; CHECK-NEXT: ret entry: %p0 = getelementptr i32, i32* %p, i32 1024 @@ -1411,8 +1423,12 @@ entry: define void @merge_zr32_3(i32* %p) { ; CHECK-LABEL: merge_zr32_3: ; CHECK: // %entry -; CHECK-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 -; CHECK-NEXT: stp q[[REG]], q[[REG]], [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 +; NOSTRICTALIGN-NEXT: stp q[[REG]], q[[REG]], [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}, #8] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}, #16] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}, #24] ; CHECK-NEXT: ret entry: store i32 0, i32* %p @@ -1437,7 +1453,8 @@ entry: define void @merge_zr32_2vec(<2 x i32>* %p) { ; CHECK-LABEL: merge_zr32_2vec: ; CHECK: // %entry -; CHECK-NEXT: str xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: str xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] ; CHECK-NEXT: ret entry: store <2 x i32> zeroinitializer, <2 x i32>* %p @@ -1448,8 +1465,10 @@ entry: define void @merge_zr32_3vec(<3 x i32>* %p) { ; CHECK-LABEL: merge_zr32_3vec: ; CHECK: // %entry -; CHECK-NEXT: str xzr, [x{{[0-9]+}}] -; CHECK-NEXT: str wzr, [x{{[0-9]+}}, #8] +; NOSTRICTALIGN-NEXT: str xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #8] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: str wzr, [x{{[0-9]+}}, #8] ; CHECK-NEXT: ret entry: store <3 x i32> zeroinitializer, <3 x i32>* %p @@ -1460,7 +1479,9 @@ entry: define void @merge_zr32_4vec(<4 x i32>* %p) { ; CHECK-LABEL: merge_zr32_4vec: ; CHECK: // %entry -; CHECK-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}, #8] ; CHECK-NEXT: ret entry: store <4 x i32> zeroinitializer, <4 x i32>* %p @@ -1471,7 +1492,8 @@ entry: define void @merge_zr32_2vecf(<2 x float>* %p) { ; CHECK-LABEL: merge_zr32_2vecf: ; CHECK: // %entry -; CHECK-NEXT: str xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: str xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] ; CHECK-NEXT: ret entry: store <2 x float> zeroinitializer, <2 x float>* %p @@ -1482,7 +1504,9 @@ entry: define void @merge_zr32_4vecf(<4 x float>* %p) { ; CHECK-LABEL: merge_zr32_4vecf: ; CHECK: // %entry -; CHECK-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp wzr, wzr, [x{{[0-9]+}}, #8] ; CHECK-NEXT: ret entry: store <4 x float> zeroinitializer, <4 x float>* %p @@ -1502,13 +1526,42 @@ entry: ret void } +; Similar to merge_zr32, but for 64-bit values and with unaligned stores. +define void @merge_zr64_unalign(<2 x i64>* %p) { +; CHECK-LABEL: merge_zr64_unalign: +; CHECK: // %entry +; NOSTRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; STRICTALIGN: strb wzr, +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; STRICTALIGN: strb +; CHECK-NEXT: ret +entry: + store <2 x i64> zeroinitializer, <2 x i64>* %p, align 1 + ret void +} + ; Similar to merge_zr32_3, replaceZeroVectorStore should not split the ; vector store since the zero constant vector has multiple uses. define void @merge_zr64_2(i64* %p) { ; CHECK-LABEL: merge_zr64_2: ; CHECK: // %entry -; CHECK-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 -; CHECK-NEXT: stp q[[REG]], q[[REG]], [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 +; NOSTRICTALIGN-NEXT: stp q[[REG]], q[[REG]], [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}] +; STRICTALIGN-NEXT: stp xzr, xzr, [x{{[0-9]+}}, #16] ; CHECK-NEXT: ret entry: store i64 0, i64* %p Modified: vendor/llvm/dist/test/CodeGen/AArch64/swifterror.ll ============================================================================== --- vendor/llvm/dist/test/CodeGen/AArch64/swifterror.ll Fri Feb 17 18:49:18 2017 (r313880) +++ vendor/llvm/dist/test/CodeGen/AArch64/swifterror.ll Fri Feb 17 19:35:08 2017 (r313881) @@ -13,18 +13,18 @@ define float @foo(%swift_error** swifter ; CHECK-APPLE: malloc ; CHECK-APPLE: orr [[ID:w[0-9]+]], wzr, #0x1 ; CHECK-APPLE: strb [[ID]], [x0, #8] -; CHECK-APPLE: mov x19, x0 -; CHECK-APPLE-NOT: x19 +; CHECK-APPLE: mov x21, x0 +; CHECK-APPLE-NOT: x21 ; CHECK-O0-LABEL: foo: ; CHECK-O0: orr w{{.*}}, wzr, #0x10 ; CHECK-O0: malloc -; CHECK-O0: mov x19, x0 -; CHECK-O0-NOT: x19 +; CHECK-O0: mov x21, x0 +; CHECK-O0-NOT: x21 ; CHECK-O0: orr [[ID:w[0-9]+]], wzr, #0x1 -; CHECK-O0-NOT: x19 +; CHECK-O0-NOT: x21 ; CHECK-O0: strb [[ID]], [x0, #8] -; CHECK-O0-NOT: x19 +; CHECK-O0-NOT: x21 entry: %call = call i8* @malloc(i64 16) %call.0 = bitcast i8* %call to %swift_error* @@ -38,20 +38,20 @@ entry: define float @caller(i8* %error_ref) { ; CHECK-APPLE-LABEL: caller: ; CHECK-APPLE: mov [[ID:x[0-9]+]], x0 -; CHECK-APPLE: mov x19, xzr +; CHECK-APPLE: mov x21, xzr ; CHECK-APPLE: bl {{.*}}foo -; CHECK-APPLE: cbnz x19 +; CHECK-APPLE: cbnz x21 ; Access part of the error object and save it to error_ref -; CHECK-APPLE: ldrb [[CODE:w[0-9]+]], [x19, #8] +; CHECK-APPLE: ldrb [[CODE:w[0-9]+]], [x21, #8] ; CHECK-APPLE: strb [[CODE]], [{{.*}}[[ID]]] -; CHECK-APPLE: mov x0, x19 +; CHECK-APPLE: mov x0, x21 ; CHECK-APPLE: bl {{.*}}free ; CHECK-O0-LABEL: caller: -; CHECK-O0: mov x19 +; CHECK-O0: mov x21 ; CHECK-O0: bl {{.*}}foo -; CHECK-O0: mov [[ID:x[0-9]+]], x19 -; CHECK-O0: cbnz x19 +; CHECK-O0: mov [[ID:x[0-9]+]], x21 +; CHECK-O0: cbnz x21 entry: %error_ptr_ref = alloca swifterror %swift_error* store %swift_error* null, %swift_error** %error_ptr_ref @@ -75,22 +75,22 @@ define float @caller2(i8* %error_ref) { ; CHECK-APPLE-LABEL: caller2: ; CHECK-APPLE: mov [[ID:x[0-9]+]], x0 ; CHECK-APPLE: fmov [[CMP:s[0-9]+]], #1.0 -; CHECK-APPLE: mov x19, xzr +; CHECK-APPLE: mov x21, xzr ; CHECK-APPLE: bl {{.*}}foo -; CHECK-APPLE: cbnz x19 +; CHECK-APPLE: cbnz x21 ; CHECK-APPLE: fcmp s0, [[CMP]] ; CHECK-APPLE: b.le ; Access part of the error object and save it to error_ref -; CHECK-APPLE: ldrb [[CODE:w[0-9]+]], [x19, #8] +; CHECK-APPLE: ldrb [[CODE:w[0-9]+]], [x21, #8] ; CHECK-APPLE: strb [[CODE]], [{{.*}}[[ID]]] -; CHECK-APPLE: mov x0, x19 +; CHECK-APPLE: mov x0, x21 ; CHECK-APPLE: bl {{.*}}free ; CHECK-O0-LABEL: caller2: -; CHECK-O0: mov x19 +; CHECK-O0: mov x21 ; CHECK-O0: bl {{.*}}foo -; CHECK-O0: mov [[ID:x[0-9]+]], x19 -; CHECK-O0: cbnz x19 +; CHECK-O0: mov [[ID:x[0-9]+]], x21 +; CHECK-O0: cbnz x21 entry: %error_ptr_ref = alloca swifterror %swift_error* br label %bb_loop @@ -123,24 +123,24 @@ define float @foo_if(%swift_error** swif ; CHECK-APPLE: malloc ; CHECK-APPLE: orr [[ID:w[0-9]+]], wzr, #0x1 ; CHECK-APPLE: strb [[ID]], [x0, #8] -; CHECK-APPLE: mov x19, x0 -; CHECK-APPLE-NOT: x19 +; CHECK-APPLE: mov x21, x0 +; CHECK-APPLE-NOT: x21 ; CHECK-APPLE: ret ; CHECK-O0-LABEL: foo_if: -; spill x19 -; CHECK-O0: str x19, [sp, [[SLOT:#[0-9]+]]] +; spill x21 +; CHECK-O0: str x21, [sp, [[SLOT:#[0-9]+]]] ; CHECK-O0: cbz w0 ; CHECK-O0: orr w{{.*}}, wzr, #0x10 ; CHECK-O0: malloc ; CHECK-O0: mov [[ID:x[0-9]+]], x0 ; CHECK-O0: orr [[ID2:w[0-9]+]], wzr, #0x1 ; CHECK-O0: strb [[ID2]], [x0, #8] -; CHECK-O0: mov x19, [[ID]] +; CHECK-O0: mov x21, [[ID]] ; CHECK-O0: ret ; reload from stack ; CHECK-O0: ldr [[ID3:x[0-9]+]], [sp, [[SLOT]]] -; CHECK-O0: mov x19, [[ID3]] +; CHECK-O0: mov x21, [[ID3]] ; CHECK-O0: ret entry: %cond = icmp ne i32 %cc, 0 @@ -162,19 +162,19 @@ normal: ; under a certain condition inside a loop. define float @foo_loop(%swift_error** swifterror %error_ptr_ref, i32 %cc, float %cc2) { ; CHECK-APPLE-LABEL: foo_loop: -; CHECK-APPLE: mov x0, x19 +; CHECK-APPLE: mov x0, x21 ; CHECK-APPLE: cbz ; CHECK-APPLE: orr w0, wzr, #0x10 ; CHECK-APPLE: malloc ; CHECK-APPLE: strb w{{.*}}, [x0, #8] ; CHECK-APPLE: fcmp ; CHECK-APPLE: b.le -; CHECK-APPLE: mov x19, x0 +; CHECK-APPLE: mov x21, x0 ; CHECK-APPLE: ret ; CHECK-O0-LABEL: foo_loop: -; spill x19 -; CHECK-O0: str x19, [sp, [[SLOT:#[0-9]+]]] +; spill x21 +; CHECK-O0: str x21, [sp, [[SLOT:#[0-9]+]]] ; CHECK-O0: b [[BB1:[A-Za-z0-9_]*]] ; CHECK-O0: [[BB1]]: ; CHECK-O0: ldr x0, [sp, [[SLOT]]] @@ -193,7 +193,7 @@ define float @foo_loop(%swift_error** sw ; CHECK-O0: b.le [[BB1]] ; reload from stack ; CHECK-O0: ldr [[ID3:x[0-9]+]], [sp] -; CHECK-O0: mov x19, [[ID3]] +; CHECK-O0: mov x21, [[ID3]] ; CHECK-O0: ret entry: br label %bb_loop @@ -229,23 +229,23 @@ define void @foo_sret(%struct.S* sret %a ; CHECK-APPLE: orr [[ID:w[0-9]+]], wzr, #0x1 ; CHECK-APPLE: strb [[ID]], [x0, #8] ; CHECK-APPLE: str w{{.*}}, [{{.*}}[[SRET]], #4] -; CHECK-APPLE: mov x19, x0 -; CHECK-APPLE-NOT: x19 +; CHECK-APPLE: mov x21, x0 +; CHECK-APPLE-NOT: x21 ; CHECK-O0-LABEL: foo_sret: ; CHECK-O0: orr w{{.*}}, wzr, #0x10 ; spill x8 ; CHECK-O0-DAG: str x8 -; spill x19 -; CHECK-O0-DAG: str x19 +; spill x21 +; CHECK-O0-DAG: str x21 ; CHECK-O0: malloc ; CHECK-O0: orr [[ID:w[0-9]+]], wzr, #0x1 ; CHECK-O0: strb [[ID]], [x0, #8] ; reload from stack ; CHECK-O0: ldr [[SRET:x[0-9]+]] ; CHECK-O0: str w{{.*}}, [{{.*}}[[SRET]], #4] -; CHECK-O0: mov x19 -; CHECK-O0-NOT: x19 +; CHECK-O0: mov x21 +; CHECK-O0-NOT: x21 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:35:45 2017 Return-Path: Delivered-To: svn-src-vendor@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 431ACCE319C; Fri, 17 Feb 2017 19:35:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 EA7521F1C; Fri, 17 Feb 2017 19:35:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJZiML074746; Fri, 17 Feb 2017 19:35:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJZhDW074745; Fri, 17 Feb 2017 19:35:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171935.v1HJZhDW074745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313882 - vendor/llvm/llvm-release_40-r295380 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:35:45 -0000 Author: dim Date: Fri Feb 17 19:35:43 2017 New Revision: 313882 URL: https://svnweb.freebsd.org/changeset/base/313882 Log: Tag llvm release_40 branch r295380. Added: vendor/llvm/llvm-release_40-r295380/ - copied from r313881, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:36:22 2017 Return-Path: Delivered-To: svn-src-vendor@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 2EDCCCE321B; Fri, 17 Feb 2017 19:36:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E7CA110B8; Fri, 17 Feb 2017 19:36:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJaLnj074925; Fri, 17 Feb 2017 19:36:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJaJ8D074911; Fri, 17 Feb 2017 19:36:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171936.v1HJaJ8D074911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313883 - in vendor/clang/dist: docs lib/AST lib/CodeGen lib/Parse lib/Sema test/CodeGen test/Parser test/Sema test/SemaCXX test/SemaObjCXX X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:36:22 -0000 Author: dim Date: Fri Feb 17 19:36:19 2017 New Revision: 313883 URL: https://svnweb.freebsd.org/changeset/base/313883 Log: Vendor import of clang release_40 branch r295380: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295380 Modified: vendor/clang/dist/docs/AutomaticReferenceCounting.rst vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplateVariadic.cpp vendor/clang/dist/test/CodeGen/object-size.c vendor/clang/dist/test/Parser/cxx1z-fold-expressions.cpp vendor/clang/dist/test/Sema/builtin-object-size.c vendor/clang/dist/test/SemaCXX/cxx11-inheriting-ctors.cpp vendor/clang/dist/test/SemaObjCXX/blocks.mm Modified: vendor/clang/dist/docs/AutomaticReferenceCounting.rst ============================================================================== --- vendor/clang/dist/docs/AutomaticReferenceCounting.rst Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/docs/AutomaticReferenceCounting.rst Fri Feb 17 19:36:19 2017 (r313883) @@ -2258,16 +2258,13 @@ non-block type [*]_. Equivalent to the .. code-block:: objc - id objc_storeStrong(id *object, id value) { - value = [value retain]; + void objc_storeStrong(id *object, id value) { id oldValue = *object; + value = [value retain]; *object = value; [oldValue release]; - return value; } -Always returns ``value``. - .. [*] This does not imply that a ``__strong`` object of block type is an invalid argument to this function. Rather it implies that an ``objc_retain`` and not an ``objc_retainBlock`` operation will be emitted if the argument is Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/docs/ReleaseNotes.rst Fri Feb 17 19:36:19 2017 (r313883) @@ -17,7 +17,7 @@ Written by the `LLVM Team `_ to Clang + documentation. OpenMP Support in Clang ---------------------------------- Modified: vendor/clang/dist/docs/UsersManual.rst ============================================================================== --- vendor/clang/dist/docs/UsersManual.rst Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/docs/UsersManual.rst Fri Feb 17 19:36:19 2017 (r313883) @@ -2056,6 +2056,8 @@ can be given manually. In this case the kernel code should contain ``#include `` just as a regular C include. +.. _opencl_cl_ext: + .. option:: -cl-ext Disables support of OpenCL extensions. All OpenCL targets provide a list @@ -2177,6 +2179,41 @@ To enable modules for OpenCL: $ clang -target spir-unknown-unknown -c -emit-llvm -Xclang -finclude-default-header -fmodules -fimplicit-module-maps -fmodules-cache-path= test.cl +OpenCL Extensions +----------------- + +All of the ``cl_khr_*`` extensions from `the official OpenCL specification +`_ +up to and including version 2.0 are available and set per target depending on the +support available in the specific architecture. + +It is possible to alter the default extensions setting per target using +``-cl-ext`` flag. (See :ref:`flags description ` for more details). + +Vendor extensions can be added flexibly by declaring the list of types and +functions associated with each extensions enclosed within the following +compiler pragma directives: + + .. code-block:: c + + #pragma OPENCL EXTENSION the_new_extension_name : begin + // declare types and functions associated with the extension here + #pragma OPENCL EXTENSION the_new_extension_name : end + +For example, parsing the following code adds ``my_t`` type and ``my_func`` +function to the custom ``my_ext`` extension. + + .. code-block:: c + + #pragma OPENCL EXTENSION my_ext : begin + typedef struct{ + int a; + }my_t; + void my_func(my_t); + #pragma OPENCL EXTENSION my_ext : end + +Declaring the same types in different vendor extensions is disallowed. + OpenCL Metadata --------------- @@ -2215,7 +2252,7 @@ does not have any effect on the IR. For `_ -opencl_hint_unroll +opencl_unroll_hint ^^^^^^^^^^^^^^^^^^ The implementation of this feature mirrors the unroll hint for C. Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ExprConstant.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/lib/AST/ExprConstant.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -604,10 +604,12 @@ namespace { /// gets a chance to look at it. EM_PotentialConstantExpressionUnevaluated, - /// Evaluate as a constant expression. Continue evaluating if either: - /// - We find a MemberExpr with a base that can't be evaluated. - /// - We find a variable initialized with a call to a function that has - /// the alloc_size attribute on it. + /// Evaluate as a constant expression. In certain scenarios, if: + /// - we find a MemberExpr with a base that can't be evaluated, or + /// - we find a variable initialized with a call to a function that has + /// the alloc_size attribute on it + /// then we may consider evaluation to have succeeded. + /// /// In either case, the LValue returned shall have an invalid base; in the /// former, the base will be the invalid MemberExpr, in the latter, the /// base will be either the alloc_size CallExpr or a CastExpr wrapping @@ -890,10 +892,6 @@ namespace { return KeepGoing; } - bool allowInvalidBaseExpr() const { - return EvalMode == EM_OffsetFold; - } - class ArrayInitLoopIndex { EvalInfo &Info; uint64_t OuterIndex; @@ -1394,8 +1392,10 @@ static bool Evaluate(APValue &Result, Ev static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This, const Expr *E, bool AllowNonLiteralTypes = false); -static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info); -static bool EvaluatePointer(const Expr *E, LValue &Result, EvalInfo &Info); +static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info, + bool InvalidBaseOK = false); +static bool EvaluatePointer(const Expr *E, LValue &Result, EvalInfo &Info, + bool InvalidBaseOK = false); static bool EvaluateMemberPointer(const Expr *E, MemberPtr &Result, EvalInfo &Info); static bool EvaluateTemporary(const Expr *E, LValue &Result, EvalInfo &Info); @@ -4803,6 +4803,7 @@ class LValueExprEvaluatorBase : public ExprEvaluatorBase { protected: LValue &Result; + bool InvalidBaseOK; typedef LValueExprEvaluatorBase LValueExprEvaluatorBaseTy; typedef ExprEvaluatorBase ExprEvaluatorBaseTy; @@ -4811,9 +4812,14 @@ protected: return true; } + bool evaluatePointer(const Expr *E, LValue &Result) { + return EvaluatePointer(E, Result, this->Info, InvalidBaseOK); + } + public: - LValueExprEvaluatorBase(EvalInfo &Info, LValue &Result) : - ExprEvaluatorBaseTy(Info), Result(Result) {} + LValueExprEvaluatorBase(EvalInfo &Info, LValue &Result, bool InvalidBaseOK) + : ExprEvaluatorBaseTy(Info), Result(Result), + InvalidBaseOK(InvalidBaseOK) {} bool Success(const APValue &V, const Expr *E) { Result.setFrom(this->Info.Ctx, V); @@ -4825,7 +4831,7 @@ public: QualType BaseTy; bool EvalOK; if (E->isArrow()) { - EvalOK = EvaluatePointer(E->getBase(), Result, this->Info); + EvalOK = evaluatePointer(E->getBase(), Result); BaseTy = E->getBase()->getType()->castAs()->getPointeeType(); } else if (E->getBase()->isRValue()) { assert(E->getBase()->getType()->isRecordType()); @@ -4836,7 +4842,7 @@ public: BaseTy = E->getBase()->getType(); } if (!EvalOK) { - if (!this->Info.allowInvalidBaseExpr()) + if (!InvalidBaseOK) return false; Result.setInvalid(E); return true; @@ -4930,8 +4936,8 @@ namespace { class LValueExprEvaluator : public LValueExprEvaluatorBase { public: - LValueExprEvaluator(EvalInfo &Info, LValue &Result) : - LValueExprEvaluatorBaseTy(Info, Result) {} + LValueExprEvaluator(EvalInfo &Info, LValue &Result, bool InvalidBaseOK) : + LValueExprEvaluatorBaseTy(Info, Result, InvalidBaseOK) {} bool VisitVarDecl(const Expr *E, const VarDecl *VD); bool VisitUnaryPreIncDec(const UnaryOperator *UO); @@ -4984,10 +4990,11 @@ public: /// * function designators in C, and /// * "extern void" objects /// * @selector() expressions in Objective-C -static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info) { +static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info, + bool InvalidBaseOK) { assert(E->isGLValue() || E->getType()->isFunctionType() || E->getType()->isVoidType() || isa(E)); - return LValueExprEvaluator(Info, Result).Visit(E); + return LValueExprEvaluator(Info, Result, InvalidBaseOK).Visit(E); } bool LValueExprEvaluator::VisitDeclRefExpr(const DeclRefExpr *E) { @@ -5148,7 +5155,7 @@ bool LValueExprEvaluator::VisitArraySubs if (E->getBase()->getType()->isVectorType()) return Error(E); - if (!EvaluatePointer(E->getBase(), Result, Info)) + if (!evaluatePointer(E->getBase(), Result)) return false; APSInt Index; @@ -5160,7 +5167,7 @@ bool LValueExprEvaluator::VisitArraySubs } bool LValueExprEvaluator::VisitUnaryDeref(const UnaryOperator *E) { - return EvaluatePointer(E->getSubExpr(), Result, Info); + return evaluatePointer(E->getSubExpr(), Result); } bool LValueExprEvaluator::VisitUnaryReal(const UnaryOperator *E) { @@ -5308,7 +5315,7 @@ static bool getBytesReturnedByAllocSizeC /// and mark Result's Base as invalid. static bool evaluateLValueAsAllocSize(EvalInfo &Info, APValue::LValueBase Base, LValue &Result) { - if (!Info.allowInvalidBaseExpr() || Base.isNull()) + if (Base.isNull()) return false; // Because we do no form of static analysis, we only support const variables. @@ -5342,17 +5349,27 @@ namespace { class PointerExprEvaluator : public ExprEvaluatorBase { LValue &Result; + bool InvalidBaseOK; bool Success(const Expr *E) { Result.set(E); return true; } + bool evaluateLValue(const Expr *E, LValue &Result) { + return EvaluateLValue(E, Result, Info, InvalidBaseOK); + } + + bool evaluatePointer(const Expr *E, LValue &Result) { + return EvaluatePointer(E, Result, Info, InvalidBaseOK); + } + bool visitNonBuiltinCallExpr(const CallExpr *E); public: - PointerExprEvaluator(EvalInfo &info, LValue &Result) - : ExprEvaluatorBaseTy(info), Result(Result) {} + PointerExprEvaluator(EvalInfo &info, LValue &Result, bool InvalidBaseOK) + : ExprEvaluatorBaseTy(info), Result(Result), + InvalidBaseOK(InvalidBaseOK) {} bool Success(const APValue &V, const Expr *E) { Result.setFrom(Info.Ctx, V); @@ -5399,9 +5416,10 @@ public: }; } // end anonymous namespace -static bool EvaluatePointer(const Expr* E, LValue& Result, EvalInfo &Info) { +static bool EvaluatePointer(const Expr* E, LValue& Result, EvalInfo &Info, + bool InvalidBaseOK) { assert(E->isRValue() && E->getType()->hasPointerRepresentation()); - return PointerExprEvaluator(Info, Result).Visit(E); + return PointerExprEvaluator(Info, Result, InvalidBaseOK).Visit(E); } bool PointerExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { @@ -5414,7 +5432,7 @@ bool PointerExprEvaluator::VisitBinaryOp if (IExp->getType()->isPointerType()) std::swap(PExp, IExp); - bool EvalPtrOK = EvaluatePointer(PExp, Result, Info); + bool EvalPtrOK = evaluatePointer(PExp, Result); if (!EvalPtrOK && !Info.noteFailure()) return false; @@ -5432,7 +5450,7 @@ bool PointerExprEvaluator::VisitBinaryOp } bool PointerExprEvaluator::VisitUnaryAddrOf(const UnaryOperator *E) { - return EvaluateLValue(E->getSubExpr(), Result, Info); + return evaluateLValue(E->getSubExpr(), Result); } bool PointerExprEvaluator::VisitCastExpr(const CastExpr* E) { @@ -5466,7 +5484,7 @@ bool PointerExprEvaluator::VisitCastExpr case CK_DerivedToBase: case CK_UncheckedDerivedToBase: - if (!EvaluatePointer(E->getSubExpr(), Result, Info)) + if (!evaluatePointer(E->getSubExpr(), Result)) return false; if (!Result.Base && Result.Offset.isZero()) return true; @@ -5513,7 +5531,7 @@ bool PointerExprEvaluator::VisitCastExpr } case CK_ArrayToPointerDecay: if (SubExpr->isGLValue()) { - if (!EvaluateLValue(SubExpr, Result, Info)) + if (!evaluateLValue(SubExpr, Result)) return false; } else { Result.set(SubExpr, Info.CurrentCall->Index); @@ -5530,18 +5548,19 @@ bool PointerExprEvaluator::VisitCastExpr return true; case CK_FunctionToPointerDecay: - return EvaluateLValue(SubExpr, Result, Info); + return evaluateLValue(SubExpr, Result); case CK_LValueToRValue: { LValue LVal; - if (!EvaluateLValue(E->getSubExpr(), LVal, Info)) + if (!evaluateLValue(E->getSubExpr(), LVal)) return false; APValue RVal; // Note, we use the subexpression's type in order to retain cv-qualifiers. if (!handleLValueToRValueConversion(Info, E, E->getSubExpr()->getType(), LVal, RVal)) - return evaluateLValueAsAllocSize(Info, LVal.Base, Result); + return InvalidBaseOK && + evaluateLValueAsAllocSize(Info, LVal.Base, Result); return Success(RVal, E); } } @@ -5586,7 +5605,7 @@ bool PointerExprEvaluator::visitNonBuilt if (ExprEvaluatorBaseTy::VisitCallExpr(E)) return true; - if (!(Info.allowInvalidBaseExpr() && getAllocSizeAttr(E))) + if (!(InvalidBaseOK && getAllocSizeAttr(E))) return false; Result.setInvalid(E); @@ -5609,12 +5628,12 @@ bool PointerExprEvaluator::VisitBuiltinC unsigned BuiltinOp) { switch (BuiltinOp) { case Builtin::BI__builtin_addressof: - return EvaluateLValue(E->getArg(0), Result, Info); + return evaluateLValue(E->getArg(0), Result); case Builtin::BI__builtin_assume_aligned: { // We need to be very careful here because: if the pointer does not have the // asserted alignment, then the behavior is undefined, and undefined // behavior is non-constant. - if (!EvaluatePointer(E->getArg(0), Result, Info)) + if (!evaluatePointer(E->getArg(0), Result)) return false; LValue OffsetResult(Result); @@ -6255,7 +6274,7 @@ class TemporaryExprEvaluator : public LValueExprEvaluatorBase { public: TemporaryExprEvaluator(EvalInfo &Info, LValue &Result) : - LValueExprEvaluatorBaseTy(Info, Result) {} + LValueExprEvaluatorBaseTy(Info, Result, false) {} /// Visit an expression which constructs the value of this temporary. bool VisitConstructExpr(const Expr *E) { @@ -7358,7 +7377,8 @@ static bool tryEvaluateBuiltinObjectSize if (!EvaluateAsRValue(Info, E, RVal)) return false; LVal.setFrom(Info.Ctx, RVal); - } else if (!EvaluatePointer(ignorePointerCastsAndParens(E), LVal, Info)) + } else if (!EvaluatePointer(ignorePointerCastsAndParens(E), LVal, Info, + /*InvalidBaseOK=*/true)) return false; } Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.h Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.h Fri Feb 17 19:36:19 2017 (r313883) @@ -166,7 +166,7 @@ struct ObjCEntrypoints { /// void objc_release(id); llvm::Constant *objc_release; - /// id objc_storeStrong(id*, id); + /// void objc_storeStrong(id*, id); llvm::Constant *objc_storeStrong; /// id objc_storeWeak(id*, id); Modified: vendor/clang/dist/lib/Parse/ParseExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Parse/ParseExpr.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/lib/Parse/ParseExpr.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -2408,7 +2408,7 @@ Parser::ParseParenExpression(ParenParseO // fold-expressions, we'll need to allow multiple ArgExprs here. if (ArgExprs.size() == 1 && isFoldOperator(Tok.getKind()) && NextToken().is(tok::ellipsis)) - return ParseFoldExpression(Result, T); + return ParseFoldExpression(ArgExprs[0], T); ExprType = SimpleExpr; Result = Actions.ActOnParenListExpr(OpenLoc, Tok.getLocation(), Modified: vendor/clang/dist/lib/Sema/SemaLookup.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaLookup.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/lib/Sema/SemaLookup.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -2831,6 +2831,9 @@ Sema::SpecialMemberOverloadResult *Sema: assert((SM != CXXDefaultConstructor && SM != CXXDestructor) && "parameter-less special members can't have qualified arguments"); + // FIXME: Get the caller to pass in a location for the lookup. + SourceLocation LookupLoc = RD->getLocation(); + llvm::FoldingSetNodeID ID; ID.AddPointer(RD); ID.AddInteger(SM); @@ -2912,7 +2915,7 @@ Sema::SpecialMemberOverloadResult *Sema: VK = VK_RValue; } - OpaqueValueExpr FakeArg(SourceLocation(), ArgType, VK); + OpaqueValueExpr FakeArg(LookupLoc, ArgType, VK); if (SM != CXXDefaultConstructor) { NumArgs = 1; @@ -2926,13 +2929,13 @@ Sema::SpecialMemberOverloadResult *Sema: if (VolatileThis) ThisTy.addVolatile(); Expr::Classification Classification = - OpaqueValueExpr(SourceLocation(), ThisTy, + OpaqueValueExpr(LookupLoc, ThisTy, RValueThis ? VK_RValue : VK_LValue).Classify(Context); // Now we perform lookup on the name we computed earlier and do overload // resolution. Lookup is only performed directly into the class since there // will always be a (possibly implicit) declaration to shadow any others. - OverloadCandidateSet OCS(RD->getLocation(), OverloadCandidateSet::CSK_Normal); + OverloadCandidateSet OCS(LookupLoc, OverloadCandidateSet::CSK_Normal); DeclContext::lookup_result R = RD->lookup(Name); if (R.empty()) { @@ -2987,7 +2990,7 @@ Sema::SpecialMemberOverloadResult *Sema: } OverloadCandidateSet::iterator Best; - switch (OCS.BestViableFunction(*this, SourceLocation(), Best)) { + switch (OCS.BestViableFunction(*this, LookupLoc, Best)) { case OR_Success: Result->setMethod(cast(Best->Function)); Result->setKind(SpecialMemberOverloadResult::Success); Modified: vendor/clang/dist/lib/Sema/SemaStmt.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaStmt.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/lib/Sema/SemaStmt.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -2743,15 +2743,17 @@ bool Sema::isCopyElisionCandidate(QualTy // ...automatic... if (!VD->hasLocalStorage()) return false; + // Return false if VD is a __block variable. We don't want to implicitly move + // out of a __block variable during a return because we cannot assume the + // variable will no longer be used. + if (VD->hasAttr()) return false; + if (AllowParamOrMoveConstructible) return true; // ...non-volatile... if (VD->getType().isVolatileQualified()) return false; - // __block variables can't be allocated in a way that permits NRVO. - if (VD->hasAttr()) return false; - // Variables with higher required alignment than their type's ABI // alignment cannot use NRVO. if (!VD->getType()->isDependentType() && VD->hasAttr() && Modified: vendor/clang/dist/lib/Sema/SemaTemplateVariadic.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplateVariadic.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/lib/Sema/SemaTemplateVariadic.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -1014,6 +1014,11 @@ ExprResult Sema::ActOnCXXFoldExpr(Source CheckFoldOperand(*this, LHS); CheckFoldOperand(*this, RHS); + auto DiscardOperands = [&] { + CorrectDelayedTyposInExpr(LHS); + CorrectDelayedTyposInExpr(RHS); + }; + // [expr.prim.fold]p3: // In a binary fold, op1 and op2 shall be the same fold-operator, and // either e1 shall contain an unexpanded parameter pack or e2 shall contain @@ -1021,6 +1026,7 @@ ExprResult Sema::ActOnCXXFoldExpr(Source if (LHS && RHS && LHS->containsUnexpandedParameterPack() == RHS->containsUnexpandedParameterPack()) { + DiscardOperands(); return Diag(EllipsisLoc, LHS->containsUnexpandedParameterPack() ? diag::err_fold_expression_packs_both_sides @@ -1034,6 +1040,7 @@ ExprResult Sema::ActOnCXXFoldExpr(Source if (!LHS || !RHS) { Expr *Pack = LHS ? LHS : RHS; assert(Pack && "fold expression with neither LHS nor RHS"); + DiscardOperands(); if (!Pack->containsUnexpandedParameterPack()) return Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << Pack->getSourceRange(); Modified: vendor/clang/dist/test/CodeGen/object-size.c ============================================================================== --- vendor/clang/dist/test/CodeGen/object-size.c Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/test/CodeGen/object-size.c Fri Feb 17 19:36:19 2017 (r313883) @@ -549,3 +549,22 @@ int incomplete_and_function_types() { // CHECK: store i32 0 gi = __builtin_object_size(incomplete_char_array, 3); } + +// Flips between the pointer and lvalue evaluator a lot. +void deeply_nested() { + struct { + struct { + struct { + struct { + int e[2]; + char f; // Inhibit our writing-off-the-end check + } d[2]; + } c[2]; + } b[2]; + } *a; + + // CHECK: store i32 4 + gi = __builtin_object_size(&a->b[1].c[1].d[1].e[1], 1); + // CHECK: store i32 4 + gi = __builtin_object_size(&a->b[1].c[1].d[1].e[1], 3); +} Modified: vendor/clang/dist/test/Parser/cxx1z-fold-expressions.cpp ============================================================================== --- vendor/clang/dist/test/Parser/cxx1z-fold-expressions.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/test/Parser/cxx1z-fold-expressions.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -34,3 +34,12 @@ template int bad9() { return ( template int bad10() { return (3 ? ... : N); } // expected-error +{{}} expected-note {{to match}} template int bad11() { return (N + ... 0); } // expected-error {{expected a foldable binary operator}} expected-error {{expected expression}} template int bad12() { return (... N); } // expected-error {{expected expression}} + +template void as_operand_of_cast(int a, T ...t) { + return + (int)(a + ... + undeclared_junk) + // expected-error {{undeclared}} expected-error {{does not contain any unexpanded}} + (int)(t + ... + undeclared_junk) + // expected-error {{undeclared}} + (int)(... + undeclared_junk) + // expected-error {{undeclared}} expected-error {{does not contain any unexpanded}} + (int)(undeclared_junk + ...) + // expected-error {{undeclared}} + (int)(a + ...); // expected-error {{does not contain any unexpanded}} +} Modified: vendor/clang/dist/test/Sema/builtin-object-size.c ============================================================================== --- vendor/clang/dist/test/Sema/builtin-object-size.c Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/test/Sema/builtin-object-size.c Fri Feb 17 19:36:19 2017 (r313883) @@ -76,3 +76,18 @@ int pr28314(void) { a += __builtin_object_size(p3->b, 0); return a; } + +int pr31843() { + int n = 0; + + struct { int f; } a; + int b; + n += __builtin_object_size(({&(b ? &a : &a)->f; pr31843;}), 0); // expected-warning{{expression result unused}} + + struct statfs { char f_mntonname[1024];}; + struct statfs *outStatFSBuf; + n += __builtin_object_size(outStatFSBuf->f_mntonname ? "" : "", 1); // expected-warning{{address of array}} + n += __builtin_object_size(outStatFSBuf->f_mntonname ?: "", 1); + + return n; +} Modified: vendor/clang/dist/test/SemaCXX/cxx11-inheriting-ctors.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/cxx11-inheriting-ctors.cpp Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/test/SemaCXX/cxx11-inheriting-ctors.cpp Fri Feb 17 19:36:19 2017 (r313883) @@ -105,3 +105,31 @@ namespace PR31606 { // Note, we do *not* allow operator=='s argument to use the inherited A::A(Base&&) constructor to construct from B{}. bool b = A{} == B{}; // expected-error {{invalid operands}} } + +namespace implicit_member_srcloc { + template + struct S3 { + }; + + template + struct S2 { + S2(S3 &&); + }; + + template + struct S1 : S2 { + using S2::S2; + S1(); + }; + + template + struct S0 { + S0(); + S0(S0&&) = default; + S1 m1; + }; + + void foo1() { + S0 s0; + } +} Modified: vendor/clang/dist/test/SemaObjCXX/blocks.mm ============================================================================== --- vendor/clang/dist/test/SemaObjCXX/blocks.mm Fri Feb 17 19:35:43 2017 (r313882) +++ vendor/clang/dist/test/SemaObjCXX/blocks.mm Fri Feb 17 19:36:19 2017 (r313883) @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class -std=c++11 %s @protocol NSObject; void bar(id(^)(void)); @@ -144,3 +144,17 @@ namespace DependentReturn { template void f(X); } + +namespace MoveBlockVariable { +struct B0 { +}; + +struct B1 { // expected-note 2 {{candidate constructor (the implicit}} + B1(B0&&); // expected-note {{candidate constructor not viable}} +}; + +B1 test_move() { + __block B0 b; + return b; // expected-error {{no viable conversion from returned value of type 'MoveBlockVariable::B0' to function return type 'MoveBlockVariable::B1'}} +} +} From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:36:55 2017 Return-Path: Delivered-To: svn-src-vendor@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 E2B52CE327A; Fri, 17 Feb 2017 19:36:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 98A781272; Fri, 17 Feb 2017 19:36:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJas19074987; Fri, 17 Feb 2017 19:36:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJasrv074986; Fri, 17 Feb 2017 19:36:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171936.v1HJasrv074986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313884 - vendor/clang/clang-release_40-r295380 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:36:56 -0000 Author: dim Date: Fri Feb 17 19:36:54 2017 New Revision: 313884 URL: https://svnweb.freebsd.org/changeset/base/313884 Log: Tag clang release_40 branch r295380. Added: vendor/clang/clang-release_40-r295380/ - copied from r313883, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:37:30 2017 Return-Path: Delivered-To: svn-src-vendor@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 0BECCCE32D1; Fri, 17 Feb 2017 19:37:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DAB601398; Fri, 17 Feb 2017 19:37:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJbSJV075058; Fri, 17 Feb 2017 19:37:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJbSwC075051; Fri, 17 Feb 2017 19:37:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171937.v1HJbSwC075051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313885 - in vendor/compiler-rt/dist: lib/builtins/arm lib/sanitizer_common test/builtins/Unit test/lsan test/lsan/TestCases X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:37:30 -0000 Author: dim Date: Fri Feb 17 19:37:28 2017 New Revision: 313885 URL: https://svnweb.freebsd.org/changeset/base/313885 Log: Vendor import of compiler-rt release_40 branch r295380: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@295380 Modified: vendor/compiler-rt/dist/lib/builtins/arm/subsf3vfp.S vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc vendor/compiler-rt/dist/test/builtins/Unit/clear_cache_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunssfdi_test.c vendor/compiler-rt/dist/test/lsan/TestCases/strace_test.cc vendor/compiler-rt/dist/test/lsan/lit.common.cfg Modified: vendor/compiler-rt/dist/lib/builtins/arm/subsf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/subsf3vfp.S Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/lib/builtins/arm/subsf3vfp.S Fri Feb 17 19:37:28 2017 (r313885) @@ -21,7 +21,7 @@ DEFINE_COMPILERRT_FUNCTION(__subsf3vfp) #if defined(COMPILER_RT_ARMHF_TARGET) vsub.f32 s0, s0, s1 -#elsee +#else vmov s14, r0 // move first param from r0 into float register vmov s15, r1 // move second param from r1 into float register vsub.f32 s14, s14, s15 Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Feb 17 19:37:28 2017 (r313885) @@ -23,11 +23,6 @@ #ifdef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS #endif -#if SANITIZER_FREEBSD -#define _WANT_RTENTRY -#include -#include -#endif #include #include #include @@ -433,6 +428,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El unsigned struct_input_absinfo_sz = sizeof(struct input_absinfo); unsigned struct_input_id_sz = sizeof(struct input_id); unsigned struct_mtpos_sz = sizeof(struct mtpos); + unsigned struct_rtentry_sz = sizeof(struct rtentry); unsigned struct_termio_sz = sizeof(struct termio); unsigned struct_vt_consize_sz = sizeof(struct vt_consize); unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes); @@ -452,7 +448,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El unsigned struct_midi_info_sz = sizeof(struct midi_info); unsigned struct_mtget_sz = sizeof(struct mtget); unsigned struct_mtop_sz = sizeof(struct mtop); - unsigned struct_rtentry_sz = sizeof(struct rtentry); unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument); unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec); unsigned struct_synth_info_sz = sizeof(struct synth_info); Modified: vendor/compiler-rt/dist/test/builtins/Unit/clear_cache_test.c ============================================================================== --- vendor/compiler-rt/dist/test/builtins/Unit/clear_cache_test.c Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/test/builtins/Unit/clear_cache_test.c Fri Feb 17 19:37:28 2017 (r313885) @@ -18,9 +18,20 @@ void __clear_cache(void* start, void* en if (!FlushInstructionCache(GetCurrentProcess(), start, end-start)) exit(1); } + +static uintptr_t get_page_size() { + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; +} #else +#include #include extern void __clear_cache(void* start, void* end); + +static uintptr_t get_page_size() { + return sysconf(_SC_PAGE_SIZE); +} #endif @@ -56,8 +67,9 @@ unsigned char execution_buffer[128]; int main() { // make executable the page containing execution_buffer - char* start = (char*)((uintptr_t)execution_buffer & (-4095)); - char* end = (char*)((uintptr_t)(&execution_buffer[128+4096]) & (-4095)); + uintptr_t page_size = get_page_size(); + char* start = (char*)((uintptr_t)execution_buffer & (-page_size)); + char* end = (char*)((uintptr_t)(&execution_buffer[128+page_size]) & (-page_size)); #if defined(_WIN32) DWORD dummy_oldProt; MEMORY_BASIC_INFORMATION b; Modified: vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfdi_test.c ============================================================================== --- vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfdi_test.c Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfdi_test.c Fri Feb 17 19:37:28 2017 (r313885) @@ -95,9 +95,6 @@ int main() if (test__fixunsdfdi(0x1.FFFFFFFFFFFFEp+62, 0x7FFFFFFFFFFFF800LL)) return 1; - if (test__fixunsdfdi(0x1.p+64, 0xFFFFFFFFFFFFFFFFLL)) - return 1; - #if !TARGET_LIBGCC if (test__fixunsdfdi(-0x1.FFFFFFFFFFFFFp+62, 0)) return 1; Modified: vendor/compiler-rt/dist/test/builtins/Unit/fixunssfdi_test.c ============================================================================== --- vendor/compiler-rt/dist/test/builtins/Unit/fixunssfdi_test.c Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/test/builtins/Unit/fixunssfdi_test.c Fri Feb 17 19:37:28 2017 (r313885) @@ -79,8 +79,6 @@ int main() return 1; if (test__fixunssfdi(0x1.000000p+63F, 0x8000000000000000LL)) return 1; - if (test__fixunssfdi(0x1.000000p+64F, 0xFFFFFFFFFFFFFFFFLL)) - return 1; if (test__fixunssfdi(0x1.FFFFFEp+62F, 0x7FFFFF8000000000LL)) return 1; if (test__fixunssfdi(0x1.FFFFFCp+62F, 0x7FFFFF0000000000LL)) Modified: vendor/compiler-rt/dist/test/lsan/TestCases/strace_test.cc ============================================================================== --- vendor/compiler-rt/dist/test/lsan/TestCases/strace_test.cc Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/test/lsan/TestCases/strace_test.cc Fri Feb 17 19:37:28 2017 (r313885) @@ -1,4 +1,5 @@ // Test that lsan reports a proper error when running under strace. +// REQUIRES: strace // RUN: %clangxx_lsan %s -o %t // RUN: not strace -o /dev/null %run %t 2>&1 | FileCheck %s Modified: vendor/compiler-rt/dist/test/lsan/lit.common.cfg ============================================================================== --- vendor/compiler-rt/dist/test/lsan/lit.common.cfg Fri Feb 17 19:36:54 2017 (r313884) +++ vendor/compiler-rt/dist/test/lsan/lit.common.cfg Fri Feb 17 19:37:28 2017 (r313885) @@ -4,6 +4,8 @@ import os +import lit.util + def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) if attr_value == None: @@ -29,6 +31,9 @@ else: lit_config.fatal("Unknown LSan test mode: %r" % lsan_lit_test_mode) config.name += config.name_suffix +if lit.util.which('strace'): + config.available_features.add('strace') + clang_cflags = ["-O0", config.target_cflags] + config.debug_info_flags clang_cxxflags = config.cxx_mode_flags + clang_cflags lsan_incdir = config.test_source_root + "/../" From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:38:03 2017 Return-Path: Delivered-To: svn-src-vendor@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 5AF1BCE334D; Fri, 17 Feb 2017 19:38:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0E06F161C; Fri, 17 Feb 2017 19:38:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJc2Vi075273; Fri, 17 Feb 2017 19:38:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJc2u0075272; Fri, 17 Feb 2017 19:38:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171938.v1HJc2u0075272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313886 - vendor/compiler-rt/compiler-rt-release_40-r295380 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:38:03 -0000 Author: dim Date: Fri Feb 17 19:38:01 2017 New Revision: 313886 URL: https://svnweb.freebsd.org/changeset/base/313886 Log: Tag compiler-rt release_40 branch r295380. Added: vendor/compiler-rt/compiler-rt-release_40-r295380/ - copied from r313885, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:38:37 2017 Return-Path: Delivered-To: svn-src-vendor@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 74EE3CE339F; Fri, 17 Feb 2017 19:38:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2A3FB1745; Fri, 17 Feb 2017 19:38:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJca7I075337; Fri, 17 Feb 2017 19:38:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJcaEh075336; Fri, 17 Feb 2017 19:38:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171938.v1HJcaEh075336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313887 - vendor/libc++/dist/test/std/experimental/filesystem/fs.op.funcs/fs.op.hard_lk_ct X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:38:37 -0000 Author: dim Date: Fri Feb 17 19:38:36 2017 New Revision: 313887 URL: https://svnweb.freebsd.org/changeset/base/313887 Log: Vendor import of libc++ release_40 branch r295380: https://llvm.org/svn/llvm-project/libcxx/branches/release_40@295380 Modified: vendor/libc++/dist/test/std/experimental/filesystem/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp Modified: vendor/libc++/dist/test/std/experimental/filesystem/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/filesystem/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp Fri Feb 17 19:38:01 2017 (r313886) +++ vendor/libc++/dist/test/std/experimental/filesystem/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp Fri Feb 17 19:38:36 2017 (r313887) @@ -57,15 +57,19 @@ TEST_CASE(hard_link_count_for_directory) Dir3Expect = 3; // . .. file5 #endif TEST_CHECK(hard_link_count(StaticEnv::Dir) == DirExpect || - hard_link_count(StaticEnv::Dir) == DirExpectAlt); + hard_link_count(StaticEnv::Dir) == DirExpectAlt || + hard_link_count(StaticEnv::Dir) == 1); TEST_CHECK(hard_link_count(StaticEnv::Dir3) == Dir3Expect || - hard_link_count(StaticEnv::Dir3) == Dir3ExpectAlt); + hard_link_count(StaticEnv::Dir3) == Dir3ExpectAlt || + hard_link_count(StaticEnv::Dir3) == 1); std::error_code ec; TEST_CHECK(hard_link_count(StaticEnv::Dir, ec) == DirExpect || - hard_link_count(StaticEnv::Dir, ec) == DirExpectAlt); + hard_link_count(StaticEnv::Dir, ec) == DirExpectAlt || + hard_link_count(StaticEnv::Dir) == 1); TEST_CHECK(hard_link_count(StaticEnv::Dir3, ec) == Dir3Expect || - hard_link_count(StaticEnv::Dir3, ec) == Dir3ExpectAlt); + hard_link_count(StaticEnv::Dir3, ec) == Dir3ExpectAlt || + hard_link_count(StaticEnv::Dir3) == 1); } TEST_CASE(hard_link_count_increments_test) { From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:39:10 2017 Return-Path: Delivered-To: svn-src-vendor@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 E361ACE33F6; Fri, 17 Feb 2017 19:39:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9696A1893; Fri, 17 Feb 2017 19:39:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJd9rZ075404; Fri, 17 Feb 2017 19:39:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJd9KQ075403; Fri, 17 Feb 2017 19:39:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171939.v1HJd9KQ075403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313888 - vendor/libc++/libc++-release_40-r295380 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:39:11 -0000 Author: dim Date: Fri Feb 17 19:39:09 2017 New Revision: 313888 URL: https://svnweb.freebsd.org/changeset/base/313888 Log: Tag libc++ release_40 branch r295380. Added: vendor/libc++/libc++-release_40-r295380/ - copied from r313887, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:39:29 2017 Return-Path: Delivered-To: svn-src-vendor@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 5CA02CE343C; Fri, 17 Feb 2017 19:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1440C19C6; Fri, 17 Feb 2017 19:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJdSds075460; Fri, 17 Feb 2017 19:39:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJdSLA075459; Fri, 17 Feb 2017 19:39:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171939.v1HJdSLA075459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313889 - vendor/lld/lld-release_40-r295380 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:39:29 -0000 Author: dim Date: Fri Feb 17 19:39:27 2017 New Revision: 313889 URL: https://svnweb.freebsd.org/changeset/base/313889 Log: Tag lld release_40 branch r295380. Added: vendor/lld/lld-release_40-r295380/ - copied from r313888, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Fri Feb 17 19:39:33 2017 Return-Path: Delivered-To: svn-src-vendor@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 0ED0BCE348C; Fri, 17 Feb 2017 19:39:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B7ADF19EF; Fri, 17 Feb 2017 19:39:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HJdVLc075509; Fri, 17 Feb 2017 19:39:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HJdVJ0075508; Fri, 17 Feb 2017 19:39:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702171939.v1HJdVJ0075508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 17 Feb 2017 19:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313890 - vendor/lldb/lldb-release_40-r295380 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 19:39:33 -0000 Author: dim Date: Fri Feb 17 19:39:31 2017 New Revision: 313890 URL: https://svnweb.freebsd.org/changeset/base/313890 Log: Tag lldb release_40 branch r295380. Added: vendor/lldb/lldb-release_40-r295380/ - copied from r313889, vendor/lldb/dist/