From owner-svn-ports-head@freebsd.org Thu Sep 26 20:53:43 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8895713432D; Thu, 26 Sep 2019 20:53:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46fRwl33QBz3xkp; Thu, 26 Sep 2019 20:53:43 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C45962AE; Thu, 26 Sep 2019 20:53:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8QKrhXi049667; Thu, 26 Sep 2019 20:53:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8QKrg1b049665; Thu, 26 Sep 2019 20:53:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909262053.x8QKrg1b049665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 26 Sep 2019 20:53:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r512986 - in head/sysutils/intel-pcm: . files X-SVN-Group: ports-head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sysutils/intel-pcm: . files X-SVN-Commit-Revision: 512986 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2019 20:53:43 -0000 Author: imp Date: Thu Sep 26 20:53:42 2019 New Revision: 512986 URL: https://svnweb.freebsd.org/changeset/ports/512986 Log: The code creates a lambda function that takes by reference the core_id local variable, and pass it to a thread that often executes after constructor has exited causing per-core thread to use a corrupted core_id. Depending on compiler and runtime execution (and whether executing over gdb), the tool might segfault or have incorrect behavior. This makes sure the lambda function takes copy of automatic variable in enclosing environment. Submitted upstream as https://github.com/opcm/pcm/pull/162 Submitted by: Loic Prylli Sponsored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D21804 Added: head/sysutils/intel-pcm/files/patch-cpucounters.cpp (contents, props changed) Modified: head/sysutils/intel-pcm/Makefile (contents, props changed) Modified: head/sysutils/intel-pcm/Makefile ============================================================================== --- head/sysutils/intel-pcm/Makefile Thu Sep 26 20:40:02 2019 (r512985) +++ head/sysutils/intel-pcm/Makefile Thu Sep 26 20:53:42 2019 (r512986) @@ -3,6 +3,7 @@ PORTNAME= intel-pcm PORTVERSION= 201902 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= imp@FreeBSD.org Added: head/sysutils/intel-pcm/files/patch-cpucounters.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/intel-pcm/files/patch-cpucounters.cpp Thu Sep 26 20:53:42 2019 (r512986) @@ -0,0 +1,11 @@ +--- cpucounters.cpp ++++ cpucounters.cpp +@@ -1617,7 +1617,7 @@ class CoreTaskQueue + CoreTaskQueue(CoreTaskQueue &) = delete; + public: + CoreTaskQueue(int32 core) : +- worker([&]() { ++ worker([=]() { + TemporalThreadAffinity tempThreadAffinity(core); + std::unique_lock lock(m); + while (1) {