From patchwork Wed Dec 6 09:30:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 120797 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6828936qgn; Wed, 6 Dec 2017 01:34:12 -0800 (PST) X-Google-Smtp-Source: AGs4zMZwzoQ2y7dP+bKd02QE+Ahg4QuGH6HEAOPBxM+8r/itYt+fcfU0cDZINj8d32CCKmDlsSib X-Received: by 10.37.105.80 with SMTP id e77mr14450982ybc.150.1512552852361; Wed, 06 Dec 2017 01:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512552852; cv=none; d=google.com; s=arc-20160816; b=YQOVqMd7x2yCjTl4+LCtFoXVN4sl2G8NJGQmO3ONJoaSKAUh6D5Wh8XiVeG1TvXY0O HEdvAXtOUd1vpKCJzAyqTOzwa1jbuprPmYuN8Cg98ty5g2UrQsobLcems3fWmtSyZCbg P5xJNu2j97KJ7UuWRa9KLObx6Qz9eE1WxewQHLPkUF9vRLYxN3ZOzLu5rt4UjW0Sm0Nh UlCXi6PwRRlAjx/OYyjkCyYXGYxT0aGpLhlKx1Ot0m4v1TB5/F2SiVdL9Cs6IJueILeG SfHyl2u0nqBvZiKDLc1lCcfA4+CuCA5Vz5M4I1xg7nQK0YDZjzwv/D6Du8qxrKcFRXCt keUQ== 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:mime-version:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=GuGcJXJxA3Iivs76hfSTTAXiWLETtEB0b0e/jfNrdwY=; b=HQH9+9ZzdcsHw1WavNI2xBNSh+z8kQaQMRTYq2xJbXptMkAUhAqzqmqAV72s1lgcsV qt+kBpF7BByX72rOP+k2zkeR57VhhMvOYO1cy4AhUDN3Kvsj2vD+VyPLQ6uanHtGkEu2 xWlk7PSgCxxzYs1zwuHrszHeUb+NWD5x8xKdIBOwvRNocT8X38coHjg0/rZjTG8iTD7K +5vQOqz7lz35fX8S2UersCFtqwlkFWL6wYyTaEI9vZzbp3FFHBqUAdY/WVTc27JjuGYu E54/1KYoNPVPC/wyo2cVJ/1GRn3ncjWwB6PgBO4hIxYP/H1U0jB50Y888NJsaVnEGCoV HihA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=i/fDBdoB; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id m125si529611ywe.709.2017.12.06.01.34.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 06 Dec 2017 01:34:12 -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; dkim=fail header.i=@linaro.org header.s=google header.b=i/fDBdoB; 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=linaro.org Received: from localhost ([::1]:54562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMW5j-0001Tl-Ne for patch@linaro.org; Wed, 06 Dec 2017 04:34:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMW2m-0007Cq-Ae for qemu-devel@nongnu.org; Wed, 06 Dec 2017 04:31:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMW2i-00010Y-8Z for qemu-devel@nongnu.org; Wed, 06 Dec 2017 04:31:08 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:46166) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eMW2i-000103-22 for qemu-devel@nongnu.org; Wed, 06 Dec 2017 04:31:04 -0500 Received: by mail-wm0-x242.google.com with SMTP id r78so6017641wme.5 for ; Wed, 06 Dec 2017 01:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GuGcJXJxA3Iivs76hfSTTAXiWLETtEB0b0e/jfNrdwY=; b=i/fDBdoBFZEeN4gZZu+v7kUSQZVULZhyNdz60ndtxnxCrW1s3TzefnTY8Qs6v+72pO lgHYv14vCwcOwEsvzEHfd8PUzfMbs/vSkdLmB1EXJqFYBTrdmfEHS/1zvnCv8aguoXnG 1BnGa6WA1k8ylcNNVNTJQT2KTUYgNhnoRoQHo= 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=GuGcJXJxA3Iivs76hfSTTAXiWLETtEB0b0e/jfNrdwY=; b=XWouqtVgVcwGra6zZurlTuGSIVfY1St0VI2p6gMm/prqMtGgi6rZFaogdGH9kiFaVe CIm8CDap3AqNujjPwgt0PBSoRwtYoqAgOrse6C00D0dSZEF/enqTzvQpkYjYf/T9gX3J Fj+odt56fMVFacCFNmWriPHa1ViYQLl1pgDwnoMKBT6PT95HVURCVspGNfMxO2HlTmf7 Sc0QMf2oGydzVNXzzH2Cy9WP8y5GI/VhLoNeGJysFBK6+plhPmfHO7mBwTAric7wcyRV aLppsdwaQyAcye9OBH9FB1vfKWLNbztdf1kCXP0M9iEosmXZ0PLfa6u6eBSk623Xkj6W KTcA== X-Gm-Message-State: AKGB3mKPvJGS6sSOiSna1MlGhYlh4JzQXJnwR2NBu3epPtO8inYEQaVK fSe9ZjYuIc6SP57aEgZkZFGfyw== X-Received: by 10.28.220.67 with SMTP id t64mr12006172wmg.150.1512552662867; Wed, 06 Dec 2017 01:31:02 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a74sm3116144wrc.7.2017.12.06.01.31.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 01:31:02 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A74053E00B4; Wed, 6 Dec 2017 09:31:01 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 6 Dec 2017 09:30:50 +0000 Message-Id: <20171206093050.25308-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [RFC PATCH] target/sh4/translate.c: 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: =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno , 1735384@bugs.launchpad.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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. Reported-by: John Paul Adrian Glaubitz Suggested-by: Richard Henderson Signed-off-by: Alex Bennée --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 Tested-by: John Paul Adrian Glaubitz Tested-by: John Paul Adrian Glaubitz Reviewed-by: Richard Henderson Reviewed-by: Aurelien Jarno 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); }