From patchwork Tue Jan 28 01:23:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 182985 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp4447377ile; Mon, 27 Jan 2020 17:23:41 -0800 (PST) X-Google-Smtp-Source: APXvYqw9zziimOBr7JjEUcR3Lb8cfkfSrkS+psfZLJETNQMAdJlYwwZzMOIzK06TLmchP58GX3f6 X-Received: by 2002:a17:902:760e:: with SMTP id k14mr19420461pll.119.1580174621749; Mon, 27 Jan 2020 17:23:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580174621; cv=none; d=google.com; s=arc-20160816; b=oRq97xoPQ+qcPkZ3asbUx4qAMV9DIElC3GLHDqAj5/5SYDrlR79Em192HSWS1uWxQP wc0wxCDhGx9SoEOLkz9QkFR6Ysch1Lbbuv0Dq6ad9nBaiChPyElBkgsRXf5yNk3Fjlu6 GvIoUXucyFp0Lxy7SFq9/kkkX/XzFf1vbU4u+Rq+OGVP/8wCKXOgdAGkPVglof2ArxAc TQg26gWyVnJYibYmN2Eayr0DUjfhJD5bnslPxkeMhOoAJNJoCkJ94AhMQdyawODHWN6e /ZI62Ucp3C7krL6deukG24yrldjFKxJ+r4O3RkXyzACr7SAWPP7YDbs4QDd6CnNNXbxO p9Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature :dkim-signature; bh=DRJnYMGG5taMDU6VSBMz/jUns+g16L3hgV3nQm2H5aY=; b=jsKoefrPby9ohzrurr56zsYlanU8mm0h/04jclW7FnXCQdcFAhfyYq/z3BFmwgZ2sp 78xpSm9F2ptw/zTtGtDyGdwdGjDF4nIqn6zVlF5yVMiRDb0qsilnIKzne5I1Ab5QHNlI UW96X1vywVjNEtfN5mcQ4l+xssnDuABVc5iles5bkci9A72Lcam+onFTXtgoYLCYYv3k ekAENDdHTLnV9QLjzc4+6Gqtw0ZPwKaa3G0bbdQ1dYJAB4wCPjOb2K7yFlKS89m6z6Pj IYRYSwkDWPG+qnCh+L+gaN9eKL5Gu4j66p1uykB3odnVEDjm85tXOoeEQWsWwekBkNQd hpHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="L/v+HLnu"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="Xfq7Z/Ht"; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=IP2cbNvq; spf=pass (google.com: domain of valgrind-developers-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=valgrind-developers-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id e4si9312035pgk.87.2020.01.27.17.23.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jan 2020 17:23:41 -0800 (PST) Received-SPF: pass (google.com: domain of valgrind-developers-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="L/v+HLnu"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="Xfq7Z/Ht"; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=IP2cbNvq; spf=pass (google.com: domain of valgrind-developers-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=valgrind-developers-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iwFbG-0004pv-Rj; Tue, 28 Jan 2020 01:23:30 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iwFbF-0004po-CT for valgrind-developers@lists.sourceforge.net; Tue, 28 Jan 2020 01:23:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=a6IMTJcoHT2SCWMmwq9aDUrPU3qI+z1ozfYIV9h+YoI=; b=L/v+HLnu9zcydNNR3INnnWpEBx 7LBNYTO5oLUzKo2rj+vLOSqAaLQ9LPn8jnyNEdztuSE7QtMRvg5x1KxAtQT4UjXTOhOslMjpTtExP NnB/UwLmuHOFP7MAaD3K4pdnKnEgLnHTFFadeUAsuznOatZ/UDorHgxg3dvdakdbbm3I=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=a6IMTJcoHT2SCWMmwq9aDUrPU3qI+z1ozfYIV9h+YoI=; b=X fq7Z/HtNHjHfzmvkpAljmL71ikgU9K/NMyGUqGleK1X6mSkYN2O77bBCOVy0uAR3js6cW+EYJZ43C 23Ro4uMmg3ej+F34aBV1E2Unrp/FMGSk8vuyd4s1X/B52oUTYBRnXMjEE3aSdrJe2fvdiL+ebEgsw ZE0RJAWDc9WXbKCg=; Received: from mail-pl1-f195.google.com ([209.85.214.195]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1iwFbE-002YZb-5o for valgrind-developers@lists.sourceforge.net; Tue, 28 Jan 2020 01:23:29 +0000 Received: by mail-pl1-f195.google.com with SMTP id t14so4426528plr.8 for ; Mon, 27 Jan 2020 17:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a6IMTJcoHT2SCWMmwq9aDUrPU3qI+z1ozfYIV9h+YoI=; b=IP2cbNvqoXDbXsePUt03pEwtIfUQqX6u13MDzypZW2tMeEyBKgTatoSa/3uE8dN7Au Bn5/5YVLmLYd6ivuEhPsYeqqmxadXAEkF4MxjE/qOticusPnLO89k0aI3cXh5ReXURyx jZki06RNjNsQTlSbLvoIh7RZc25ZUVHoHyghIB3o4bYYy2BIvAejPKX2rOE3gXkalptZ +3Ds1FVmWrEVLiVnxUJO5OwnoTRPvrp+VUEr05y+6UIrE1aI1qyDkeaEBtZC18KZqmEy LwnUwEPE7nbz/DOBSAo2I1X7sti8JxRFtaGkMdSWrkiAqIyrHEouMUTP1LXY9JakMqYg TVYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a6IMTJcoHT2SCWMmwq9aDUrPU3qI+z1ozfYIV9h+YoI=; b=bXr22lpSLsUxqtwYbKw6yW28+fUwsSuE9WSeQSmFQTnXMctSksEO5aCs+WFF4DRGPw OyzZDbETCEVvlIjnQJzFhrb+YMvNlwqd5uJY4zY5/jRioEe72TfpWkvsiBGm8Pab72ma hMYyKAKcPJyDj/HJTqidX2oZTp7jPq8rDgpKpDouXtAa7oyRs114kSUYOjRT2jsFnASa kDm6HAtFpUiuan0eOpGY9hR8B/f/lkhUFlFIrb+OhWmEP5Sf5Bqeuew96uJWkQvvX4Ev OIgUsJuItRLt83A9SKSfT+B1MP7/SjwJTVQW0QwG+Wbe8OhM/crCdNmPEufRHcco42Ii IwYw== X-Gm-Message-State: APjAAAU27OqF9ocEJ2xMc50pTTgTunmI/edHV72Tjv8lul2PXcK3LD+e XZwZNJNh/dbXuip/p+M/sLr4dHHxxIA= X-Received: by 2002:a17:90a:5215:: with SMTP id v21mr1778283pjh.31.1580174601931; Mon, 27 Jan 2020 17:23:21 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:4e0::c362]) by smtp.gmail.com with ESMTPSA id 10sm6685178pfu.132.2020.01.27.17.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 17:23:21 -0800 (PST) From: Khem Raj To: valgrind-developers@lists.sourceforge.net Date: Mon, 27 Jan 2020 17:23:21 -0800 Message-Id: <20200128012321.578096-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Spam-Score: -0.1 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raj.khem[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.214.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.214.195 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1iwFbE-002YZb-5o Subject: [Valgrind-developers] [PATCH] tests: Make pthread_detatch call portable across platforms X-BeenThere: valgrind-developers@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical discussion for valgrind developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: valgrind-developers-bounces@lists.sourceforge.net pthread_t is opaque type therefore we can not apply simple arithmetic to variables of pthread_t type this test needs to pass a invalid pthread_t handle, typcasting (long)thread works too and is portable across glibc and musl Fixes | pth_detached3.c:24:25: error: invalid use of undefined type 'struct __pthread' | 24 | pthread_detach(thread + 8); | | ^ Signed-off-by: Khem Raj --- drd/tests/pth_detached3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.0 _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c index c02eef11a..341193ba1 100644 --- a/drd/tests/pth_detached3.c +++ b/drd/tests/pth_detached3.c @@ -21,7 +21,7 @@ int main(int argc, char** argv) pthread_detach(thread); /* Invoke pthread_detach() with an invalid thread ID. */ - pthread_detach(thread + 8); + pthread_detach((pthread_t)((long)thread + 8)); fprintf(stderr, "Finished.\n");