From patchwork Mon Dec 18 22:40:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 122324 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3409779qgn; Mon, 18 Dec 2017 14:43:39 -0800 (PST) X-Google-Smtp-Source: ACJfBosrgUnskmf1uDyv7OECfkVPLgqHDETO6CFNuYQ7JUoIgh/oo4ufly3fMeSt7us6FohWLusS X-Received: by 10.129.116.6 with SMTP id p6mr1040188ywc.136.1513637019563; Mon, 18 Dec 2017 14:43:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513637019; cv=none; d=google.com; s=arc-20160816; b=zWZfIWxBogDWcnRYHAOTMSDtdzxxbqfFEAMIpBbr9TqMdwf8d176H6BYH+2vOXMaVC IGA0IhVN/0yYe8N8Zgmqu3mHSFTTmHUy2uJ3JgIALEg65eh0Z+koyNndkZLT7S5r4Od6 usfU2M+Y2RkTvdcoNWZbuQTfQXxAYWDrINEefJnpa997NhaK90ppgM3leO2Ww+CjnYGw kefsbEsuQspJ9VFfcvzeoY7U7voW8MyTGx35roMiLYThZ+e3UcSsv/mgEOfPTwmNw2hi zx0WOl3c5bdt0arD/CDHO9CPLIURdCyx0j6PspPRIrTVA2OO9QO2GqwH3WQXXnqnrKlc j3Ig== 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:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=ZnPCnTghddftXeOXT5BjwrY57rgkU1ahpB/MCsKquzU=; b=nXUUNh6AD9vK+ZnqgMoTr/FJWVuZVJUPnEBtV32JF9QYDP0BiAocm2eBg2GpbwlFl2 8drY4KQLd0plBxP8KFOJiusGgrub07uO6w2ejCZKTkflBj9OkOHiJ+pOFNsHygrH5eLX z+zmo8d22R5LcfluJ1pgukiq3mDjsakFtJJUDe+Zihk9iKY1Hox+ZOHX0EEl1KqbhBcR 3sWskzHWPQgjLXjUBFYdG14nm45EZ/htOJbUN490R9L5nSiK2Ds6vTbsyg+V5jhAtStn r0/g/1ALvrNAoSlwApR/t4lXk1CEjvZLZsN8oWqPDpc/S2mTwSv3JNee5oZkLXcLEY64 I4og== 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s206si2564723ywg.804.2017.12.18.14.43.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 18 Dec 2017 14:43:39 -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 Received: from localhost ([::1]:49989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eR48J-0000pi-2x for patch@linaro.org; Mon, 18 Dec 2017 17:43:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eR45a-0007He-DW for qemu-devel@nongnu.org; Mon, 18 Dec 2017 17:40:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eR45Z-00046u-9V for qemu-devel@nongnu.org; Mon, 18 Dec 2017 17:40:50 -0500 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:43012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eR45Z-0003uc-3t; Mon, 18 Dec 2017 17:40:49 -0500 Received: from [2001:bc8:30d7:120:9bb5:8936:7e6a:9e36] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eR45P-0008D9-Rx; Mon, 18 Dec 2017 23:40:39 +0100 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.90_RC3) (envelope-from ) id 1eR45P-000707-5A; Mon, 18 Dec 2017 23:40:39 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Mon, 18 Dec 2017 23:40:26 +0100 Message-Id: <20171218224030.26726-3-aurelien@aurel32.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171218224030.26726-1-aurelien@aurel32.net> References: <20171218224030.26726-1-aurelien@aurel32.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:bc8:30d7:100::1 Subject: [Qemu-devel] [PULL 2/6] 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-stable@nongnu.org, Aurelien Jarno 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 --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 diff --git a/target/sh4/translate.c b/target/sh4/translate.c index f56808b45d..4a4a5c877e 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -2191,7 +2191,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); }