| Message ID | 20260416023021.626949-2-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306646; bh=Fcr5/1CD6JazpMvyPo/7rzj14KiboFRdyEAG5QT6J1g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=b+0szplD1+f+coOL0Nb7yaUzBVGChKxWKWfuRlsjrgSdYj+ydk724Ak1lmE1hW4Cs zvwHkuGqzYDxwefx78Xayre7liKIxrVULXzCzR6L3snCU8U+9nwTDR5S79vY/Iht1t D2AQwUNlAKpGZFxCbOvuOf8fRLbCXCepdYs1aul0= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C30976A4A6 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:30:46 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id TnkqAeqI7ohX for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:30:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306646; bh=Fcr5/1CD6JazpMvyPo/7rzj14KiboFRdyEAG5QT6J1g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=b+0szplD1+f+coOL0Nb7yaUzBVGChKxWKWfuRlsjrgSdYj+ydk724Ak1lmE1hW4Cs zvwHkuGqzYDxwefx78Xayre7liKIxrVULXzCzR6L3snCU8U+9nwTDR5S79vY/Iht1t D2AQwUNlAKpGZFxCbOvuOf8fRLbCXCepdYs1aul0= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B13166A49F for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:30:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306643; bh=/xEMDvJNINevxuk5nEDhR+hrAKAVU5KABj8CXKZdrD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JEvohTO7iiYA4M6+D97bsq5EvWrYpM0uAbiwO6Icw3cZzCrTgGikx9dcb0DGrhimT tqKPNxA5TExfSwxppIfg2ZvrABN8fZ9zfzbhND8dO2vPybDJqMyX3dAKByfRXegi4h wVvfVPLnhdiraHR8YrM6xQFZ2cTo0LFAFf2pN7GQ= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E8D4F6A49F; Wed, 15 Apr 2026 20:30:43 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id AAIfssBcEY9D; Wed, 15 Apr 2026 20:30:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306643; bh=2s7ec9EEURs2ZUiiHxrRhGCalIfi83XV4dEwJuFn5mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNn1QOKx/6AL6OdDiEmujjwpiy3+Jds7UPJwkW87qfQvmoQIXh3Q+l527KdP/3wdD SaVkizgHPvyJGFlqrTWg1ybuHVdvYc/Kj4HzT/DAaE+FD7ucGLRMdv/DuW52Ab+5rL FInd8khffI46QxhNGE3sLqJ+WtqJkakpg74N4NDc= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 70CC56A44C; Wed, 15 Apr 2026 20:30:43 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:26 -0600 Message-ID: <20260416023021.626949-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260416023021.626949-1-sjg@u-boot.org> References: <20260416023021.626949-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ULTML3E6ET5UQTE2KMTZDZVFC7Z4EIGI X-Message-ID-Hash: ULTML3E6ET5UQTE2KMTZDZVFC7Z4EIGI X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/33] malloc: Double the allocation registry size List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/ULTML3E6ET5UQTE2KMTZDZVFC7Z4EIGI/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Fix memory leaks and test pollution in sandbox tests
|
|
Commit Message
Simon Glass
April 16, 2026, 2:29 a.m. UTC
From: Simon Glass <sjg@chromium.org> When running the full test suite, the live allocation count can exceed 20000, overflowing the mcheck registry. Once that happens, further allocations are still returned but their headers are not registered, so leak reports cannot recover the caller string and simply show a blank caller field. The failure is easy to miss because the "registry overflow" message is printed only once and may be silenced under the unit-test console. Bump REGISTRY_SZ to 40000 so the whole suite fits. The array lives in .data and only costs an extra 160KiB for sandbox builds, which is acceptable for a debug-only feature. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/mcheck_core.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/mcheck_core.inc.h b/common/mcheck_core.inc.h index 65f83836d61..968b058ba6d 100644 --- a/common/mcheck_core.inc.h +++ b/common/mcheck_core.inc.h @@ -71,7 +71,7 @@ #define PADDINGFLOOD ((char)0x58) // Full test suite can exceed 10000 concurrent allocations -#define REGISTRY_SZ 20000 +#define REGISTRY_SZ 40000 #define CANARY_DEPTH 2 // avoid problems with BSS at early stage: