From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AF43606A325 for ; Mon, 30 Nov 2026 14:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=buildroot.org header.i=@buildroot.org header.a=rsa-sha256 header.s=default header.b=qTqTKoyx; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=F4CDHT6t Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E7BDA6074A; Mon, 30 Nov 2026 14:03:02 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ICAOS_BiO7HY; Mon, 30 Nov 2026 14:03:02 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 0131E606E9 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796047382; b=AeraOs2LShJUhGZt0+ZioN1vkP9q9v/KyMERutwocBqPvKFNMgyya6ltTumEow9tWjRk ixaZr7aKCZfU72M+2rixl7EuvQJzMwLTvCy8/PSKOD1ewQS5FuK+iSL4rpxCme+vY1NOd b+GpCCzOicxO4sZg2LiC/5GRah8boPo2i9iQ9vD3y1yO3Rt6FITHUaGENHIQqqi+V9eGT UYFZDE44J1FvqsW+a7bdKkfc2Fk8IGuOAhBh+ftWt+MJsBNecbhqQbB9+gTBNXZhPaJm9 r2Sfp6ZdpYRhR6ZsqHHJfiEHrqpWe2s3RjEqmGOKq2u+Knp6qPhxBYol7IXqEo0DbiA== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796047382; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Date: Message-Id:X-Mailer:In-Reply-To:References:MIME-Version:Subject: X-BeenThere:X-Mailman-Version:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:Cc:Content-Type: Content-Transfer-Encoding:Errors-To:Sender; bh=SqAixsTv5ysSI+fxzM5BlHdds2PaOr+Q83aIKlkWsRI=; b=PwKu9POjq6DqOKYquxCxEOcE9pmgYQg1ChB1IEuf5MWXNGmJbyBNzoYtHndCYs+4E4Iy hZtfzkR7DjT/LjH/hIY+eYQL90iVV4a/qFNed6a2rw2ZO7pWGyweuOLc+30LscxwfwrL4 6JZRjDff1GPqUpP8XIdGPP2Ms/jPICF5UC6ICWIYEwsEWRnT3uulMsDpxeKBqCYMISZYx It9/1CDnUPUDnIR8aFqc1SVak9qWOoi3O6Yw8nkWJASYADH4DmwrZgdIpxnl/3foX/kZC TOGfHAkzYti9l7ihXj7CvJqxu+4fbrFk+tIgbZ0GwbLQR6dV/HXd8cqSO7vQDwJ53Fw== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org; s=default; t=1796047382; bh=SqAixsTv5ysSI+fxzM5BlHdds2PaOr+Q83aIKlkWsRI=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=qTqTKoyxyJyd82SRg2czLC+1Y/qQ8+1Hd2dWK+74w5JVCvdGARCV9uW6evCwLqZHV piNOBuzHEKo7dL4JemxBFr12jXJY3xhiB/5UcN6YwZxFFJWAQFYiSX/hlTkbw39/il paHsYxaNFY5e0xlcTYG0ea7nT4zyvs4q+vEgIeu9gr1Jd3BWN32Ej+1uL1IDmiSo/8 Fb5u7KRN/MTpnw+shdN2d/PJYnUA+rvvNIZd4kB7VofgGb47dGM3bfkhQR51l98a1P W4lup5Do8UgOi6eE7MZJmLyoKFqwOjCvItuDZhzAvNvVZ32jRSU9UGqME5zx9LWC2a GQubHZht3vtIA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 0131E606E9; Mon, 30 Nov 2026 14:03:02 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id DC0B03C0 for ; Mon, 30 Nov 2026 14:02:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id CC57F40685 for ; Mon, 30 Nov 2026 14:02:59 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2euiUQsCNA4G for ; Mon, 30 Nov 2026 14:02:59 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org A58914067A Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip="2a00:1450:4864:20::132" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::132; helo=mail-lf1-x132.google.com; envelope-from=yegorslists@googlemail.com; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=F4CDHT6t Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by smtp4.osuosl.org (Postfix) with ESMTPS id A58914067A for ; Mon, 30 Nov 2026 14:02:58 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5c31369ae36so4006333e87.0 for ; Mon, 30 Nov 2026 06:02:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796047376; x=1796652176; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=OOps9IeRepv921cw241AXthn5qTljbo60b4p/6wsSxE=; b=F4CDHT6tpSTcEB4wks1sCjQ1b+zMIpSe0QXiOFOdY4MLsZ3144F2yzcELRHIq8D2Ba XHfJkCrkH8IPB4VUhM1nbbCMqv5269/RFWGncgRdS6cuTDctmN9+wnXgkEQolBZq/x9B urQba5bJTStETGLSo24ULxbsahDr0kT79ol4dqX7z26aqtVTdOR269JIneXxRxK5pPeH z8C+ou/6lcdZO2RRxcnPRQ77PXto/BLQ5k6ySFWQatPca2RecBUUHGW1ygYG97UMDi6P DLnIgM24QtlElDq+ONLi+qpFMXRWPOc38UG7j6pp9R3SnnUgZwAaRi3Mw/RjcfQFrA5r 4P2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796047376; x=1796652176; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=OOps9IeRepv921cw241AXthn5qTljbo60b4p/6wsSxE=; b=Xjc3q/dDZ+UdAT4wwwv5JVLfFwYNtyY6bMBdV82JmdLK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fK4agP3WSM7xuSQ1GQ1FfPEqhvKO3E9FRXtY+fG/quUnVvTRjpwDB4N7nYW9 C5F2ome3YcZtiX4jAx5UU0KdUEPvzpQ2eg609emFoWCLzhAqETKDrZYKjtXlTE+bAszieYXnM52 GbGyFUPcM X-Received: by 2002:a05:6512:6c5:b0:5b8:f8f9:e080 with SMTP id 2adb3069b0e04-5c1bc81a0f2mr9663644e87.26.1796047375144; Mon, 30 Nov 2026 06:02:55 -0800 (PST) Received: from development2.visionsystems.local (mail.visionsystems.de. [213.209.99.202]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6ba370fa8a4sm14193561a12.21.2026.11.30.06.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 06:02:54 -0800 (PST) From: Yegor Yefremov To: Michael Fischer Date: Mon, 30 Nov 2026 15:02:52 +0100 Message-Id: <20261130140252.375531-1-yegorslists@googlemail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261130100159.29006-1-mf@go-sys.de> References: <20261130100159.29006-1-mf@go-sys.de> X-Archived-By: MIME-Version: 1.0 Subject: Re: [Buildroot] [PATCH] package/json-c: fix memory leak X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Archive: List-Post: List-Help: List-Subscribe: , Cc: buildroot@buildroot.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "buildroot" X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Michael, On Mon, Nov 30, 2026 at 11:02 AM Michael Fischer wrote: > > json-c 0.19 rewrote json_object_put() iteratively (issue #923). The final > release of every non-empty object/array happens inside an assert(): > > assert(_json_object_put_maybe_free(jso, 1) == 0); > > Buildroot builds json-c as CMAKE_BUILD_TYPE=Release, i.e. with -DNDEBUG, so > the expression is never evaluated and every non-empty container leaks (Review done with Claude's help, checked by me.) Good catch, the analysis is right: Buildroot's CMake toolchain file sets CMAKE_C_FLAGS_RELEASE to -DNDEBUG, so the free is compiled out. This has already been fixed upstream, three days after the 0.19 release, by commit f291fa81c6f2 ("free objects outside assert() in json_object_put", PR #936), which does the same as your patch and applies cleanly to 0.19. Could you send a v2 that backports it instead? - Use the upstream commit as is (https://github.com/json-c/json-c/commit/f291fa81c6f21d925ea771a8cca597f5886309cc.patch) and add above your Signed-off-by: Upstream: https://github.com/json-c/json-c/commit/f291fa81c6f21d925ea771a8cca597f5886309cc check-package currently complains about the missing Upstream: tag. - In the commit message, please add the culprit commit: Fixes: b4b0e7b369761a4cea9809f73c836afc8adc3432 ("package/json-c: bump to version 0.19") and drop the "add patch: ..." line. 0.18 didn't have this code, and all maintenance branches are still on 0.18, so only 2026.11-rc is affected. It would be good to have this in before 2026.11 is released. Best regards, Yegor _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot