From patchwork Fri Dec 21 20:10:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1017701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mo3snBxi"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="jHWuOeuM"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43M0B666Wqz9s8J for ; Sat, 22 Dec 2018 07:10:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=K4Mfm4r3kIZeRuNrTCB40J3wYBKSgQwpDc1DYFpW5nE=; b=Mo3snBxiJZ9dY2 nI/YLwdW63msFaQrcyZypsei4FLn6I5uHrFGgk6RqpfWDTSvMl1yM5wwxYbEVwpIca/iQvn0366CX M949QvglifWgEagKYyhyHeQHQWxAYrLmUW2das0vuAJonekZ1Eao6aLavri0rFek8B1rKzj2ekdSV 9pTl5U0fySJ+DNq2rRgrkTC5J24Sc6t0Xz0vcv0j1NYeYHXvEPD6ip3dThzwkLUHEgPKRLb9pm5XP CZQgsUTXGt6vRFrfHfVypVHWEbqLHUDL77q0AP4Ah2yTVwIYlcZ5uGM2Nl2MGQxpaLkBDaRT2z6ea /PPT2OxJ4jdP/dHZ+nbg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaR8G-0001QN-GK; Fri, 21 Dec 2018 20:10:52 +0000 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaR8D-0001Po-6b for linux-snps-arc@lists.infradead.org; Fri, 21 Dec 2018 20:10:50 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 03F0810C0FC1; Fri, 21 Dec 2018 12:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1545423037; bh=3jjze4XndIWx33MYLgtOW5LW8QVWNXHz5h2Fcd9wwb8=; h=From:To:CC:Subject:Date:From; b=jHWuOeuMD7+nuAojmaQ9FbSe0h9YNrlReOlZugL7Tw1Di9oLXTK5Db+q6bc1U7WRt qJm3iUKDgPdr1YwVAxJFa1zJ5VkeYNP096iLtVzzG6cGPBiGl8xRNcTgiZTozLsatd F7XHr1ZfFNZHic2USmsXWPdaI3+CQZuy4up/Y59SSTzQqQ0DATpvMUHK6BLO1BgkkN 9E0Av/2UWiFJYaSDmh4lvMYfUXDSMaI/O6pNju5qjK8QGaJ4v/npxGQr8djzX9jl8z ivuIjn4aaztuVHbrdgFRs0bV3+yaig74H/D3UjMICgoJi/IFq1wLnDcpEL+PQEvXr+ JG52fLm+LW1jA== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id C6D5F38B8; Fri, 21 Dec 2018 12:10:36 -0800 (PST) Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 21 Dec 2018 12:10:36 -0800 Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.105) by IN01WEHTCA.internal.synopsys.com (10.144.199.103) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 22 Dec 2018 01:40:33 +0530 Received: from vineetg-Latitude-E7450.internal.synopsys.com (10.10.161.70) by IN01WEHTCB.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 22 Dec 2018 01:40:34 +0530 From: Vineet Gupta To: Subject: [PATCH] rt/tst-posix_spawn: fix random crash due to uninitialized var Date: Fri, 21 Dec 2018 12:10:25 -0800 Message-ID: <1545423025-23698-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.10.161.70] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181221_121049_242432_48B7659D X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.60.111 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vineet Gupta , linux-snps-arc@lists.infradead.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Seen on ARC when it passed in 1 setup, but segv on other | Path: /sd/arc_initramfs_hs_1812-gnu-2018.09-BIG/uClibc-ng-testsuite-Os/rt/tst-posix_spawn | CPU: 1 PID: 3313 Comm: tst-posix_spawn Not tainted | 4.19.0-00003-ga4e0cf751ad3 #108 | | [ECR ]: 0x00050100 => Invalid Read @ 0x00000000 by insn @ 0x20060c84 | [EFA ]: 0x00000000 | [BLINK ]: 0x20060bf4 | [ERET ]: 0x20060c84 | @off 0x52c84 in [/lib/libuClibc-1.0.29.so] | VMA: 0x2000e000 to 0x20072000 Signed-off-by: Vineet Gupta --- test/rt/tst-posix_spawn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/rt/tst-posix_spawn.c b/test/rt/tst-posix_spawn.c index 28b6500c8e57..45cd325063f8 100644 --- a/test/rt/tst-posix_spawn.c +++ b/test/rt/tst-posix_spawn.c @@ -26,6 +26,7 @@ void run_cmd(char *cmd) posix_spawnattr_setflags(&attrs, POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSIGDEF); posix_spawnattr_setpgroup(&attrs, 0); posix_spawnattr_setsigdefault(&attrs, &defsignals); + posix_spawn_file_actions_init(&actions); printf("Run command: %s\n", cmd); status = posix_spawn(&pid, "/bin/sh", &actions, &attrs, argv, environ);