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: 1017700 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=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; 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 helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43M0B06MW7z9s8J for ; Sat, 22 Dec 2018 07:10:47 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 6648310057; Fri, 21 Dec 2018 21:10:41 +0100 (CET) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.60.111]) by helium.openadk.org (Postfix) with ESMTPS id 095C610057 for ; Fri, 21 Dec 2018 21:10:39 +0100 (CET) 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: 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] Cc: Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [uclibc-ng-devel] [PATCH] rt/tst-posix_spawn: fix random crash due to uninitialized var X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" 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);