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: 845084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="i/fDBdoB"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ysD1f62WYz9ryr for ; Wed, 6 Dec 2017 20:33:10 +1100 (AEDT) Received: from localhost ([::1]:54559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMW4i-0000eb-U6 for incoming@patchwork.ozlabs.org; Wed, 06 Dec 2017 04:33:08 -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-Google-Smtp-Source: AGs4zMaAkW/5dlY+ZVy51hKGYp/CmGZDKcmGoSUJvWARkdQY5djf/STBtTB3OGrlkXlAiW2iqBdiiw== 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+incoming=patchwork.ozlabs.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 Tested-by: John Paul Adrian Glaubitz Tested-by: John Paul Adrian Glaubitz Reviewed-by: Richard Henderson Reviewed-by: Aurelien Jarno --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }