From nobody Wed Apr 16 16:15:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1604536264; cv=none; d=zohomail.com; s=zohoarc; b=O2tjMPDfuQeeQbAMG9KKnHYcjxvsIAcRnvZztUg8/F7nJsGGOoQdpFu7OFL6Zh8eKZVylRtTzY4BzJWwif6ecNLs4X+/CBVuQARY0oHocB8Hizl7sAZA7DeJO/nLwYvhSKmhipCRXWSySTzOjflZFA+TND0e0DcJCsH+mruR9Mk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604536264; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aZDqheKeViwWkKxhyJVJqBQ0rBfSUmpaFBw1X/OyohA=; b=cwZTW9d2dFO5GbX6+126tyqnYcpA5/H/lmoMzie9nlbsv+uwHgISFjUP3s3FpSsXo29z4Hx7uxGKCl1m4rmNkJZhoHzT2M+TikIE0ACSvgp8rxotwvCIEKxE3WaRAbAOPljUQQxZZBd/19MrWCqY/Ud2cowk4WNXJYuDENs1iYg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604536264436115.3300684930623; Wed, 4 Nov 2020 16:31:04 -0800 (PST) Received: from localhost ([::1]:36396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaTB9-0000yP-9R for importer@patchew.org; Wed, 04 Nov 2020 19:31:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaT9p-00082v-N9 for qemu-devel@nongnu.org; Wed, 04 Nov 2020 19:29:41 -0500 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:33278) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaT9o-0002PY-6q for qemu-devel@nongnu.org; Wed, 04 Nov 2020 19:29:41 -0500 Received: by mail-pg1-x533.google.com with SMTP id r186so163pgr.0 for ; Wed, 04 Nov 2020 16:29:39 -0800 (PST) Received: from localhost.localdomain (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id z17sm3438528pga.85.2020.11.04.16.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 16:29:37 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=aZDqheKeViwWkKxhyJVJqBQ0rBfSUmpaFBw1X/OyohA=; b=en8O+2QP6gFyD/Dz38r8cv92xaA25UoTh7eVJGFBpCdqwM5scMrduiSGXrJPvWwmnu sA5ZiBVkpG0NMJ6V0MDNtT82uEkDzxlJZgsyk9EdtiDMNEpzAZUd5EajdKPe/KndPZfL ZCJ2R5vgSjjvvAttCxA+ZxryOcdmj7uig00YKxDxXQiGT73B6yWkKtqa30/s6Cd8IuYh uT3T/Jl/Upu3SBUqnVy0a15yB3HTn9zWtZt3PlwkJc1zAhEpYRpOEAIrZt2JVtZbMc10 MharD+OJeV6LAjO+LG/J0ZKdVJ7CzF4ioXsFsv/Prmy2/sTIkUphuJrHF8kX48AA7Ye3 velA== 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=aZDqheKeViwWkKxhyJVJqBQ0rBfSUmpaFBw1X/OyohA=; b=ITskvZF0DQAUDanuDDfU0WjBQ+oI8Re5fd7mzobXFY2DTge2lovZlWVl3jeUKzjD7W AoqLqHl5/0Tj1zCBaUWcwwVUGAJQvPkyGL7QN2lsmXTRzDGukU0+Bf1v2BS3ZIDt2iOr BAF4snCgHR+6Wo6uxYEyvcQJRvJ72siZDGFTaOMM9GX+SEY5M+FiopWL92hiBnrEE/Zg dlRpG3L9UGHs9Uofl3Xv8WpnkK12oRiOAC2cqK10Gb1i5fZyhnb/uaPRgGfWwWfk0e5F OhdvtUk09Di4rkzKWWR5ISZVdjS05FFqTET3AmV8qn8RwU5yHKulCgcAriRrtJNUdNzk bX3A== X-Gm-Message-State: AOAM531MvZNKXNUOutLqeOaoyWPyFbawUHlfvPH3IO8NLeLjUX0St/gN Df72gfOx7QzngEhx8i17OvB+m2nMZ1uNOQ== X-Google-Smtp-Source: ABdhPJxffNFWnupvn3cAMcayRhYrJyT/bMoCqg0gngLB9V4cIJqmRgHpqQbpi4kMJD+nncc8q/Fv3Q== X-Received: by 2002:a17:90a:4a15:: with SMTP id e21mr117456pjh.130.1604536178389; Wed, 04 Nov 2020 16:29:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.2 1/2] tcg: Remove assert from set_jmp_reset_offset Date: Wed, 4 Nov 2020 16:29:34 -0800 Message-Id: <20201105002935.680486-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201105002935.680486-1-richard.henderson@linaro.org> References: <20201105002935.680486-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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: Sai Pavan Boddu , peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Sai Pavan Boddu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Since 6e6c4efed99, there has been a more appropriate range check done later at the end of tcg_gen_code. There, a failing range check results in a returned error code, which causes the TB to be restarted at half the size. Reported-by: Sai Pavan Boddu Tested-by: Sai Pavan Boddu Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index f49f1a7f35..43c6cf8f52 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -335,10 +335,11 @@ static bool tcg_resolve_relocs(TCGContext *s) =20 static void set_jmp_reset_offset(TCGContext *s, int which) { - size_t off =3D tcg_current_code_size(s); - s->tb_jmp_reset_offset[which] =3D off; - /* Make sure that we didn't overflow the stored offset. */ - assert(s->tb_jmp_reset_offset[which] =3D=3D off); + /* + * We will check for overflow at the end of the opcode loop in + * tcg_gen_code, where we bound tcg_current_code_size to UINT16_MAX. + */ + s->tb_jmp_reset_offset[which] =3D tcg_current_code_size(s); } =20 #include "tcg-target.c.inc" --=20 2.25.1