From patchwork Tue Feb 6 19:14:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 127090 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3228827ljc; Tue, 6 Feb 2018 11:55:44 -0800 (PST) X-Google-Smtp-Source: AH8x226L215SswOveMTcA8d115xiL42cGtx7+lNGKMmuUi08TU7VSg7D1QJRbnmgJ7JjTSLVhuGf X-Received: by 10.129.115.86 with SMTP id o83mr2274213ywc.0.1517946944494; Tue, 06 Feb 2018 11:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517946944; cv=none; d=google.com; s=arc-20160816; b=kSu/ZULCZ8wbi4fP/nGYM5EcAFA9cAOVHYESPNNXjXd8J95fChtS1177t26VebUm7I ykHTp8bUR/rdx/u+WFYcG/W2SJB82CWDQ2QfAqnINS34xI44845HD7uNwPPZ8KYXGoY2 FzQ3MyPlV7evX6B4qlfotze3UjnP7rQhmR9XAbGtuaay/js9R0jDnNBMOsE8DfWiqXWJ dF1TvDm5lC3sVA8b+CwQmW3/43AswgLqLGsPmNpo5pTfeVGt6Jvoh2Rut+OSp5VQWjtu cn2IcK4BEFfZPx0+YjCTBD16pQeKVA0k9AHwrjBP4aFOFAm7zzD7JVFq52/e5BJ7f7YI U2qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:message-id:mime-version:references :in-reply-to:date:to:from:arc-authentication-results; bh=T/RVsifKNeSu2bMjJbZxOTEHjiu6MUsfcVzBRecHg8E=; b=fUqLKeUJqdZ33sZhFVpsU20GWiLbDt1CqDJ3ETPLTXJSzLF1DJbVX85Ltd/xaHrvQb X2F12ytRzWi755+sgJoTzB5SXajAUkNANZ9Kf0AIi9fkMNUXj8XzySgbGZHgKQGDoPVw BbQukMvytXJ6Y0A0nK9mN18krvNf3BPoS8ApTh/jg0HCq35fETuvJnRAb49XI15t3BuT 0jcLDBkj4LdaLfGCtpEoBBS0fPqGH85aNZsrW/qZ6FMwcxV0K+gNJFoATwMglBrvwGNE AX01Ir/+1/WRZ5RIyuh/ghNfwdCaiEVEn0NcHI2RVMDf9zr8+QLgSY8xqh9fQP7LIqUr vg0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w2si1029458yba.727.2018.02.06.11.55.44 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 06 Feb 2018 11:55:44 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([::1]:53648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej9LD-00073Y-U2 for patch@linaro.org; Tue, 06 Feb 2018 14:55:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej8j3-0005ec-84 for qemu-devel@nongnu.org; Tue, 06 Feb 2018 14:16:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ej8iv-0008Bk-6u for qemu-devel@nongnu.org; Tue, 06 Feb 2018 14:16:17 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41636 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ej8iu-0008Az-Ut for qemu-devel@nongnu.org; Tue, 06 Feb 2018 14:16:09 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w16JERMB020846 for ; Tue, 6 Feb 2018 14:16:08 -0500 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fyf6usgf0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 06 Feb 2018 14:16:04 -0500 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Feb 2018 14:16:03 -0500 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 6 Feb 2018 14:16:00 -0500 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w16JFxlp48693342; Tue, 6 Feb 2018 19:15:59 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 649AEAC046; Tue, 6 Feb 2018 14:17:20 -0500 (EST) Received: from localhost (unknown [9.80.97.150]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 2B5CEAC03F; Tue, 6 Feb 2018 14:17:20 -0500 (EST) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 6 Feb 2018 13:14:24 -0600 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206191515.25830-1-mdroth@linux.vnet.ibm.com> References: <20180206191515.25830-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18020619-0008-0000-0000-000002CD7B68 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008485; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00985885; UDB=6.00500282; IPR=6.00765253; BA=6.00005813; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019407; XFM=3.00000015; UTC=2018-02-06 19:16:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020619-0009-0000-0000-0000382B9EE0 Message-Id: <20180206191515.25830-4-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-06_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802060241 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id w16JERMB020846 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH 03/54] target/sh4: fix TCG leak during gusa sequence X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aurelien Jarno , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-stable@nongnu.org, christian.ehrhardt@canonical.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée This fixes bug #1735384 while running java under qemu-sh4. When debug was enabled it showed a problem with TCG temps. Once fixed I was able to run java -version normally. Cc: qemu-stable@nongnu.org Reported-by: John Paul Adrian Glaubitz Suggested-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20171206093050.25308-1-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Aurelien Jarno Signed-off-by: Aurelien Jarno (cherry picked from commit 6d56fc6cc372284a4571f09b361a9ccd99318103) Signed-off-by: Michael Roth --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 703020fe87..b4b5c822d0 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -2189,7 +2189,7 @@ static int decode_gusa(DisasContext *ctx, CPUSH4State *env, int *pmax_insns) } /* If op_src is not a valid register, then op_arg was a constant. */ - if (op_src < 0) { + if (op_src < 0 && !TCGV_IS_UNUSED(op_arg)) { tcg_temp_free_i32(op_arg); }