From patchwork Sat Jul 25 16:05:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 247147 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3413573ilg; Sat, 25 Jul 2020 09:06:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPjBZJ6Wr6YfBvOweTSxzRTSepYXNxudYSNBDmSHvbQv5HqnkX6TBwbdDwJzed123TnyiG X-Received: by 2002:a25:d80c:: with SMTP id p12mr6710526ybg.172.1595693206252; Sat, 25 Jul 2020 09:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595693206; cv=none; d=google.com; s=arc-20160816; b=aVVRACwvUpIKow4kc4gCcwctILDpvDtVquK76Sw9XrBGtzEXJSLDbgqrtfDPLXDF32 NAgUOIMxCN3V8SdTDTAH73v6ytsPEuMIEy5mjtQOWOrG6PZeXUBfbAxJLhmey9ow5gKw 4kJf/moPR9rv19PjkYdCs+ZYrgErNaRfCh6f09mbdv5AZdKrfGxBw7h11As17e07XTTr xEKXOcwB3LVsJ12xPXtWTMGFXYHLrL34BvVfxlCViCvWfqPLUOCHwJNoG3PkHNERTMCJ mhnGTB/kFodPD+hwvucEnIpbdykngyaWJDSQRuA/fCApEreOHyOwPdxVTnzuG+ZuW9g5 wDzw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=P3LyPyeEcuWa2/MKIfNsGrObBE0H+KsTUZiQvWcLS7o=; b=akDZhuI/ZalfhvgUlmLdVYiEv664HYAg+SNuorR8HF8w3gLbAerFuAME6Yt1zRiXDG I38CX7HlE6+m/M/XrrXihX3QD9xaL427En2G6SaEruAnHBcZfSSnA1BchCTHHYrezsYt NvQn1aWMimBKgMS38PT6A82ds/vRsz14PL3k4PxmZYNUMuqKqT53xePF8qEAS5AYG8Cz NZ50cwQYDOZT2Qylz11ZiGpI64F4p/KW46cBfaK4s9Q66oZ+xtq0Y23/iZv6f6UwzQz+ jlb7joFgQcpMugXwtXnFZPAasiG4ntwvNIOtiykay3huKZpYkXR1YrGzJP2c1lGtTeld oBBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qJon6ZFT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s84si4685319ybs.246.2020.07.25.09.06.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jul 2020 09:06:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qJon6ZFT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzMhB-0002Yt-Mu for patch@linaro.org; Sat, 25 Jul 2020 12:06:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzMgP-0001sp-FH for qemu-devel@nongnu.org; Sat, 25 Jul 2020 12:05:57 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:35791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jzMgN-0001rW-40 for qemu-devel@nongnu.org; Sat, 25 Jul 2020 12:05:57 -0400 Received: by mail-pl1-x644.google.com with SMTP id x9so6058801plr.2 for ; Sat, 25 Jul 2020 09:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P3LyPyeEcuWa2/MKIfNsGrObBE0H+KsTUZiQvWcLS7o=; b=qJon6ZFTh5G2iYoodM/FL3VyvM6wRxCtLL1MAPg741Lm9LZs3zgo7Q0SruRxYrfG46 UIpNkPD56LpYgBNOr3o0TcsYo5Xr2pe9bnD13iv2n8G+/N0bqmjMqenZBuH6tXHri3h3 36lQw2+SGiWIl9Fa53cwQxk/ga1p7obiNrKyY+WNIiJYsa1XWCz8M2ymV+hZf+gBB3m3 1BAOgwiVCT6/YTQ9UOhU+q67/Vsjmb1lAfIT5sN9VJXcoIWWVzcoXf7f7L8QOjzFSMYi JqPj9Imi7Ke2xSC+Z7VbF0FfOtCBaWfjY998MxH4PVqt2yxIRvDDNF1YLUFNxGt+k0mA ZeoQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=P3LyPyeEcuWa2/MKIfNsGrObBE0H+KsTUZiQvWcLS7o=; b=ujYfYc2DIdRh/NR0mZBxLvRsJBe1Lg6tD63t6zRsHYI6QuBYUoSD8F87BxwqGxJGx8 idCgHZvJYpMpuYBXIEOCjSmnppxtc+QaSZ584MrOi3Rzg6xNOI2qmXlZIaLulfNwZY4h FugaFDHyQcqGrKvkH4Y2Dj/M3aV8DLtHySsFXbD6eHh+OIUCF7RmJsJRKf5zpyDOUsgs pYso4deCRuBClCM808YlQCXKQGL9UIWGV37hAxpBG5cUPG3IdAYyW1VJMrcbCJrgDfWQ noTTvRHgI66jAQ4xnJgGQqQH3y170e23sbYT3kb/mEcvKR3j7Hrmo/Xlgm8EcVvgQg8D HcyA== X-Gm-Message-State: AOAM533r97xVZw5ExlMTp7hLWP23yipbsPXuTinZIZBFbTAtJNOkIcsu Xr00/vMaEhwdrhsg8Y6Bb9Bgln25/YI= X-Received: by 2002:a17:90a:7103:: with SMTP id h3mr8705954pjk.34.1595693152811; Sat, 25 Jul 2020 09:05:52 -0700 (PDT) Received: from localhost.localdomain (216-160-65-90.tukw.qwest.net. [216.160.65.90]) by smtp.gmail.com with ESMTPSA id e18sm9731801pff.37.2020.07.25.09.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2020 09:05:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 2/3] target/hppa: Free some temps in do_sub Date: Sat, 25 Jul 2020 09:05:47 -0700 Message-Id: <20200725160548.750749-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200725160548.750749-1-richard.henderson@linaro.org> References: <20200725160548.750749-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Two temps allocated but not freed. Do enough subtractions within a single TB and one can run out of temps entirely. Fixes: b2167459ae ("target-hppa: Implement basic arithmetic") Buglink: https://bugs.launchpad.net/qemu/+bug/1880287 Tested-by: Sven Schnelle Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20200720174039.517902-1-richard.henderson@linaro.org> --- target/hppa/translate.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.1 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 52d7bea1ea..4bd22d4820 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -1294,6 +1294,8 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1, save_or_nullify(ctx, cpu_psw_cb_msb, cb_msb); save_gpr(ctx, rt, dest); tcg_temp_free(dest); + tcg_temp_free(cb); + tcg_temp_free(cb_msb); /* Install the new nullification. */ cond_free(&ctx->null_cond);