From patchwork Sun Jun 22 13:37:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65432 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D6CAC7EE2A for ; Sun, 22 Jun 2025 13:37:51 +0000 (UTC) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web10.26157.1750599466276746420 for ; Sun, 22 Jun 2025 06:37:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=XuLkTRjm; spf=softfail (domain: sakoman.com, ip: 209.85.210.181, mailfrom: steve@sakoman.com) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-748f54dfa5fso2281129b3a.2 for ; Sun, 22 Jun 2025 06:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750599465; x=1751204265; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=APN/4pJ9hjCy1caV98neP5Flhq0IKosjKxYZL+nYrzk=; b=XuLkTRjmWcRfX1C2uFsRKD8Gny8W6aYX6QbLEU2Lrt+1EhAtCAvt9N0BySdepH3u1O cS1AtzSOKhJJfWNdkQQuIyIHHuLEgMulvIWGGti5EIxjF4xkLiSwgZktSRWSMAgEIEdb 4SIT7u9SJ61vkvV5V0Mw5jTNUmRzvyLdA2keSuBEeSJHDaVt/IBlyI+M+EYuc+MpP8Kn os5wVc6zKQDItx6kSsQK7bmb1O8YiQrFcyw+9fe6sxUKLorPJoZjHfQKRs5mq3/8H3BK ksPNkz8qA/K2/KqSmSV3HI0e7DoOS23RBXpiPpJx3UnvTATeaxuwa7W42iVbiZ1aikT6 c6ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750599465; x=1751204265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=APN/4pJ9hjCy1caV98neP5Flhq0IKosjKxYZL+nYrzk=; b=WclB6PISW8mBTn6PRH/ggjcWg1Z5zr8BUIwzOT9gyVdj865va0WdC4+IO/auPraJRm C/scLm43z9A5PixkLOrZL6bBqVoQLqaFlWI+ThjDYgRN26ZgNBWFC/EzD0bPBc6fAYPu rLGKhJq+eBL93jIrMwck+UblwPQYlsKAzeBTx1P2Lwt8POv2TpWMPyzPaDp2QQ27P4Nk AVVPQb5JlKoJO1iQLVDDUnb/VysTFLOOWkks25qLv1iYmSHamFDtvJYjAPTIk3GI/LtR XYIRDSOX1xJHll65bKib93fCnVqY7rzb2/vSa0MeDyr8YPVYHCwUNtKUk0OMUNF0ThoB LmLw== X-Gm-Message-State: AOJu0YyDfJXQE+i3yWUidapAEK3UqXoaUZSfiNBuNN48efIbfZDXhtIQ ZKOBy4z8vFkmDdqaiscxANe+0VK5Hroaqgo8XToLe7FlkXmng7pDsNd+yCNrlODditgNaZ+RtMp 08metd/Q= X-Gm-Gg: ASbGncsU/63N63xQULJa+jyxBR9ZZeXrPc9VDbqrEE9vBaCQDFRX/pCGoibSFUZkQI4 vJYQU5PS2Ruff1Mk9+DGulfFBVpaUMObH9bNVMYAQVdDGZ4PxL39T6ceq6yOTByootbbtGnYevT 448CQUsIkxWSZ+zbkO+opg883287JgSCCa4lplegqdSaUOeAqFMDSb1M1OM//+AEIupeK65B5wl RCc22JuZmkzy3HUwrBVfMRRiW16uBQnsBUe6unJfPMxYM8JmYd7DDOwGrV3X9qnskTi6Rcx4Ez5 eO4WPWCW0M6PwiPttff7svPU5BaPw3TdW5B4fvdEGRyb+JjNNlop/A== X-Google-Smtp-Source: AGHT+IHCy+8CK3cX5RKO2g/xRukz6Jx53Th9livvJnpDDu6uvSPpxoHUztL81i9N9EE5vnmud8EKzw== X-Received: by 2002:a05:6a00:a1f:b0:748:2e1a:84e3 with SMTP id d2e1a72fcca58-7490d9aae0emr15709326b3a.8.1750599465502; Sun, 22 Jun 2025 06:37:45 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:4a75:9ad8:d661:8bd8]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7490a6a72afsm5960189b3a.163.2025.06.22.06.37.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jun 2025 06:37:45 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 1/4] go: set status of CVE-2024-3566 Date: Sun, 22 Jun 2025 06:37:29 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 22 Jun 2025 13:37:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219175 From: Peter Marko NVD ([1]) tracks this as: cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* Running on/with cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* Yocto cve-check ignores the "Running on/with", so it needs to be ignored explicitly. [1] https://nvd.nist.gov/vuln/detail/CVE-2024-3566 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- meta/recipes-devtools/go/go-binary-native_1.22.12.bb | 1 + meta/recipes-devtools/go/go-common.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/meta/recipes-devtools/go/go-binary-native_1.22.12.bb b/meta/recipes-devtools/go/go-binary-native_1.22.12.bb index 747737ff94..b15b60a691 100644 --- a/meta/recipes-devtools/go/go-binary-native_1.22.12.bb +++ b/meta/recipes-devtools/go/go-binary-native_1.22.12.bb @@ -17,6 +17,7 @@ UPSTREAM_CHECK_URI = "https://golang.org/dl/" UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux" CVE_PRODUCT = "golang:go" +CVE_STATUS[CVE-2024-3566] = "not-applicable-platform: Issue only applies on Windows" S = "${WORKDIR}/go" diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc index db165792dc..a39dea6c1c 100644 --- a/meta/recipes-devtools/go/go-common.inc +++ b/meta/recipes-devtools/go/go-common.inc @@ -21,6 +21,7 @@ UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.src\.tar" # all recipe variants are created from the same product CVE_PRODUCT = "golang:go" +CVE_STATUS[CVE-2024-3566] = "not-applicable-platform: Issue only applies on Windows" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" SSTATE_SCAN_CMD = "true" From patchwork Sun Jun 22 13:37:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65435 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EC43C77B7F for ; Sun, 22 Jun 2025 13:37:51 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web11.26369.1750599468828068524 for ; Sun, 22 Jun 2025 06:37:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=c9Pgp1TF; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-74931666cbcso506120b3a.0 for ; Sun, 22 Jun 2025 06:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750599468; x=1751204268; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/AMIgVpFCdDgFKe7u7uctXLWU+t+g/ep4Kt3OPwD4dA=; b=c9Pgp1TFuUHFC5z9aumJzuPHq0J2Tdvwf1+XhKGkZSwad9IGesn7ezC0FCCJ1uRRLZ Dl/MPQmJT3wEXvBlJGM0IbiYmNIaZZHPWuJTkrtvS7zqnsuEYbqG23cuakaGY6w7o1SJ 0W8iSwVugRSpzb8TQKtoDz0QbbKQUZrvpw2SaeHAkcXfGcAhIRFQCJWHGb5fQDBRi1+p D/fM0VjQbWMeFoHi+xsT0ykmBxpQF5u/hKz6Sn8lX52qbAXF6MkkiiR2uiXHBejknTEl MSYkfwGIo3EE9pyzAjMGuNOcMibX2pCcheY1QU3w+BmMX8oZLcS/G0zEoBp5/RY8T0Ij FuGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750599468; x=1751204268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/AMIgVpFCdDgFKe7u7uctXLWU+t+g/ep4Kt3OPwD4dA=; b=DQF9HQPHTQKZHD0M6Ec85JpiOnzpfFbjuDQ05FgLaXOVR1KAsvFk991Fg5EyQqFmmI nC8xfcPQezC5u2qyj70wMBxKzlCCdc8UzjC+jyXGkYKdTl6A1DzFalx3p+EPdk/d+odQ ymZhCYmd2aK0r/xXuFmpbL2IgbDgzRJ/GpsinYDevLWc5I0pg1PNQjbyjcmbTsiE0Rf+ tpBshn10se+ODCDBq/m8m86qASgKelBkIkVJ8qrE8l2O7o6r8Uypn5O4kn2Z1ZlWlf62 s0sNXiHOhWUFYvV+4XGPHtqcbprLzHze7HtprongDDdH6q0VxWAZd0LCqUY489OufWXT q3cA== X-Gm-Message-State: AOJu0Yz3o7I9zUsFCGDc9k4pZ4R+zIU9REhI8d84pc4+QinTDY6F64F4 ZC1oJw/+AmvmWiZTrLc3y/zxcXCbJLF6O+TQLlxZwdX2SFKU8104IxFf0mJnRnjWLlJTc4GY6uf inLxWrwQ= X-Gm-Gg: ASbGncsuha+boKVG6pDp7uwCLINgPBfxjpMi+ns4G+5KZBVLmy8AaRAgfzv7naTXIeY tBGxn5OfTtnO6RYCcgZxcYSHqAD8gQXWD0WvKA8ktpUXDbQnNjhG4ZhoIvwFHJVpPfDedtmpyqM vUmf6r8G+xCCwkynUfYh+RfNK5+bod/c3pHxoDU4FP3Rs73Jt6kQbjyfOAxXxdwQWqMHbcTeTIp eSXkw3Zk1146E+ssFccz7RjV4E78oF29+uzL3YC2EMMreLmdVFuFnSRExrscPFEbGm1zdLk8VN3 ub8v/YjqD4Tq14nCHT1E9CXIJgd9zHKgRsKRcai+gUmVNWaInxpM8Q== X-Google-Smtp-Source: AGHT+IGzYZmDIcUM2Gu48Gtzemlo9d2SyiC8cmo9WJr+GG03sIF04z71bE38TOEsymIo22UD+jBhog== X-Received: by 2002:a05:6a00:a87:b0:736:43d6:f008 with SMTP id d2e1a72fcca58-7490d6044e5mr12397320b3a.12.1750599468020; Sun, 22 Jun 2025 06:37:48 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:4a75:9ad8:d661:8bd8]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7490a6a72afsm5960189b3a.163.2025.06.22.06.37.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jun 2025 06:37:47 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 2/4] coreutils: fix CVE-2025-5278 Date: Sun, 22 Jun 2025 06:37:30 -0700 Message-ID: <7af711c0a31359b57903503ab37bad53aad89c22.1750599311.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 22 Jun 2025 13:37:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219176 From: Chen Qi Backport patch to fix CVE-2025-5278. Signed-off-by: Chen Qi Signed-off-by: Steve Sakoman --- .../coreutils/coreutils/CVE-2025-5278.patch | 112 ++++++++++++++++++ meta/recipes-core/coreutils/coreutils_9.4.bb | 1 + 2 files changed, 113 insertions(+) create mode 100644 meta/recipes-core/coreutils/coreutils/CVE-2025-5278.patch diff --git a/meta/recipes-core/coreutils/coreutils/CVE-2025-5278.patch b/meta/recipes-core/coreutils/coreutils/CVE-2025-5278.patch new file mode 100644 index 0000000000..41be1635b5 --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/CVE-2025-5278.patch @@ -0,0 +1,112 @@ +From 8763c305c29d0abb7e2be4695212b42917d054b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Tue, 20 May 2025 16:03:44 +0100 +Subject: [PATCH] sort: fix buffer under-read (CWE-127) + +* src/sort.c (begfield): Check pointer adjustment +to avoid Out-of-range pointer offset (CWE-823). +(limfield): Likewise. +* tests/sort/sort-field-limit.sh: Add a new test, +which triggers with ASAN or Valgrind. +* tests/local.mk: Reference the new test. +* NEWS: Mention bug fix introduced in v7.2 (2009). +Fixes https://bugs.gnu.org/78507 + +CVE: CVE-2025-5278 + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/coreutils.git/commit/?id=8c9602e3a145e9596dc1a63c6ed67865814b6633] + +Signed-off-by: Chen Qi +--- + src/sort.c | 12 ++++++++++-- + tests/local.mk | 1 + + tests/sort/sort-field-limit.sh | 35 ++++++++++++++++++++++++++++++++++ + 3 files changed, 46 insertions(+), 2 deletions(-) + create mode 100755 tests/sort/sort-field-limit.sh + +diff --git a/src/sort.c b/src/sort.c +index b10183b6f..7af1a2512 100644 +--- a/src/sort.c ++++ b/src/sort.c +@@ -1644,7 +1644,11 @@ begfield (struct line const *line, struct keyfield const *key) + ++ptr; + + /* Advance PTR by SCHAR (if possible), but no further than LIM. */ +- ptr = MIN (lim, ptr + schar); ++ size_t remaining_bytes = lim - ptr; ++ if (schar < remaining_bytes) ++ ptr += schar; ++ else ++ ptr = lim; + + return ptr; + } +@@ -1746,7 +1750,11 @@ limfield (struct line const *line, struct keyfield const *key) + ++ptr; + + /* Advance PTR by ECHAR (if possible), but no further than LIM. */ +- ptr = MIN (lim, ptr + echar); ++ size_t remaining_bytes = lim - ptr; ++ if (echar < remaining_bytes) ++ ptr += echar; ++ else ++ ptr = lim; + } + + return ptr; +diff --git a/tests/local.mk b/tests/local.mk +index 4da6756ac..642d225fa 100644 +--- a/tests/local.mk ++++ b/tests/local.mk +@@ -388,6 +388,7 @@ all_tests = \ + tests/sort/sort-debug-keys.sh \ + tests/sort/sort-debug-warn.sh \ + tests/sort/sort-discrim.sh \ ++ tests/sort/sort-field-limit.sh \ + tests/sort/sort-files0-from.pl \ + tests/sort/sort-float.sh \ + tests/sort/sort-h-thousands-sep.sh \ +diff --git a/tests/sort/sort-field-limit.sh b/tests/sort/sort-field-limit.sh +new file mode 100755 +index 000000000..52d8e1d17 +--- /dev/null ++++ b/tests/sort/sort-field-limit.sh +@@ -0,0 +1,35 @@ ++#!/bin/sh ++# From 7.2-9.7, this would trigger an out of bounds mem read ++ ++# Copyright (C) 2025 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ sort ++getlimits_ ++ ++# This issue triggers with valgrind or ASAN ++valgrind --error-exitcode=1 sort --version 2>/dev/null && ++ VALGRIND='valgrind --error-exitcode=1' ++ ++{ printf '%s\n' aa bb; } > in || framework_failure_ ++ ++_POSIX2_VERSION=200809 $VALGRIND sort +0.${SIZE_MAX}R in > out || fail=1 ++compare in out || fail=1 ++ ++_POSIX2_VERSION=200809 $VALGRIND sort +1 -1.${SIZE_MAX}R in > out || fail=1 ++compare in out || fail=1 ++ ++Exit $fail +-- +2.34.1 + diff --git a/meta/recipes-core/coreutils/coreutils_9.4.bb b/meta/recipes-core/coreutils/coreutils_9.4.bb index 62ecdea6ec..caed1f8c49 100644 --- a/meta/recipes-core/coreutils/coreutils_9.4.bb +++ b/meta/recipes-core/coreutils/coreutils_9.4.bb @@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ file://0001-local.mk-fix-cross-compiling-problem.patch \ file://0001-posixtm-pacify-clang-18.patch \ file://CVE-2024-0684.patch \ + file://CVE-2025-5278.patch \ file://run-ptest \ " SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52" From patchwork Sun Jun 22 13:37:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65434 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABBE2C7EE30 for ; Sun, 22 Jun 2025 13:37:51 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web11.26370.1750599470486126281 for ; Sun, 22 Jun 2025 06:37:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=WnvRhzy8; spf=softfail (domain: sakoman.com, ip: 209.85.210.175, mailfrom: steve@sakoman.com) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-742c3d06de3so3906984b3a.0 for ; Sun, 22 Jun 2025 06:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750599470; x=1751204270; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zbeqwlcRSDDCTMqJa4ri6h3WXrAGSnQsjWBl9yFpxro=; b=WnvRhzy8jiIO8NEFCR5OhcNRvTk0v34OLok87DwTRLlY01Ct+aGIqKKxYm4pBAgruB bqh5JzHdAaRq9qRtZir2ivShNO4dBHx4BZrC11FiW8t7huOqX8TsK9t/QEYE1L3HOKsd z2GirJ//ndtrqqcishPQRrB5ZBbpVi8Q0fzFzyq9i1qw53r+bXioNZ+vglFKklFJjCYp RLzm22szYSKTZvwfMpcpYZ/fsS8kWj0VgN8VKdhaArUty6Vm0P6F1ESQUFlZ2RO572up oZMw13sO+ZxLcBbkHu44v2G/d2FuZ0pDxVdzxy6BOhey5mpcVYJi178yVK8XpmOmGE5X 18+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750599470; x=1751204270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zbeqwlcRSDDCTMqJa4ri6h3WXrAGSnQsjWBl9yFpxro=; b=DgAPgj1wHncvOO6TXwyGnYYdgNKWsl+4wza0BRacNzlqL6c38IisPC4o/GoHyuORCq vuSArATi6DKN9zsEVrzR0bgQZ+W9Dj+ahxqa9qmPffKvRk9uYbQnlQt1imLtM/9xQssS vJzoo3YRjmu+ztCp3JGyntIt4P76G01JxjsR/s3MBLd1ctoYnqSx/9url1NdfBXtW8CJ TVWx/nkJHObNXjazRnV0qKj1+AS4RciU2XcUEBKH9jBkUtb3DXgsecHenLbRgC8kUdDa lBvn6rg81KVCTQSOq1TLAaDwN+QvIHmvrwsAZKAi8D+7mOQ+KNt1nyTXqV87HaIQkP6o VFTw== X-Gm-Message-State: AOJu0YweeGB2E5cYw4ZwkLy/k8hI5e0UB1CAHtgu81md6yRNaXhKi91C pSm/e+3OuTIkaRSM3cXQ7rhhI4e+rCuBdFSlIKnQ/4LSbPVrdz0UcAz7ZnEEVigX7svuiI4heZz 2a+8BDRw= X-Gm-Gg: ASbGncsGy/TYwrcZap6wKBj5EM4IN+0nbTYf3H+vo77Gi+NDpokruoemz/IP9g95DoJ axBymKIgZjuSaSfWRNdEeWGnYJDu0tZVHsRwUmZykK8lcx6cgiCFTrraNLmRJZvP96w2c74W1yH ctGmFxiGMpqd8VREKoKYDIcL8KiDpQDH9o22NP2IN3UrOBI6K/qm1HSoDJF/rzZ30hg/KtF4mdJ uJvNZ5xkVI76G90a7KAh02TDkciEqfGt+QmH5JQ3DXce3aeAI0eSaOA1J9eYPh39OKyNDVhZiae imOtfkSESFl/USspg3KS+8OB6rL0UxzBBFsDFYVzXUqMxbqpCg6foQ== X-Google-Smtp-Source: AGHT+IF2YTRtgcAOa1XKq/pmyQJ6wcpKsTyVT784L5JaIo81z7gHWbsqjtIAE/AvyzXq+f6WIaxlDQ== X-Received: by 2002:a05:6a00:3c90:b0:736:2a73:6756 with SMTP id d2e1a72fcca58-7490da07100mr13115729b3a.21.1750599469629; Sun, 22 Jun 2025 06:37:49 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:4a75:9ad8:d661:8bd8]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7490a6a72afsm5960189b3a.163.2025.06.22.06.37.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jun 2025 06:37:49 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 3/4] glibc: stable 2.39 branch updates Date: Sun, 22 Jun 2025 06:37:31 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 22 Jun 2025 13:37:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219177 From: Peter Marko $ git log --oneline 3463100f2d47f2897a24ba8023a5c7aaf2d26550..06a70769fd0b2e1f2a3085ad50ab620282bd77b3 06a70769fd ppc64le: Revert "powerpc: Optimized strcmp for power10" (CVE-2025-5702) 3875045da5 ppc64le: Revert "powerpc : Add optimized memchr for POWER10" (Bug 33059) c6240a11f7 ppc64le: Revert "powerpc: Fix performance issues of strcmp power10" (CVE-2025-5702) 2caef2827f elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987) 9e25c0f445 x86_64: Fix typo in ifunc-impl-list.c. ca99d55315 elf: Test case for bug 32976 (CVE-2025-4802) 71ddb11ccd support: Add support_record_failure_barrier abdeb4b520 support: Use const char * argument in support_capture_subprogram_self_sgid 147bed0a71 elf: Keep using minimal malloc after early DTV resize (bug 32412) 4e5ee49a43 sysdeps/unix/sysv/linux/x86_64/Makefile: Add the end marker 37b30b6a68 sysdeps/x86_64/Makefile (tests): Add the end marker 9fe51d34bb sort-makefile-lines.py: Allow '_' in name and "^# name" 14ec225d85 libio: Correctly link tst-popen-fork against libpthread 1dcfb9479d libio: Fix a deadlock after fork in popen e31ac9a639 libio: Sort test variables in Makefile 68f3f1a1d0 Linux: Switch back to assembly syscall wrapper for prctl (bug 29770) d33d10642f nptl: PTHREAD_COND_INITIALIZER compatibility with pre-2.41 versions (bug 32786) b1eb369aee nptl: Use all of g1_start and g_signals ac5da3c0e4 nptl: rename __condvar_quiesce_and_switch_g1 2fdc0afd07 nptl: Fix indentation 582c99b2c0 nptl: Use a single loop in pthread_cond_wait instaed of a nested loop fc2a25417d nptl: Remove g_refs from condition variables 6f5ba03968 nptl: Remove unnecessary quadruple check in pthread_cond_wait d0da34ad30 nptl: Remove unnecessary catch-all-wake in condvar group switch ea13a35e37 nptl: Update comments and indentation for new condvar implementation 2451ef5c4a pthreads NPTL: lost wakeup fix 2 test results: Before After Diff FAIL 207 207 0 PASS 4912 4915 +3 UNSUPPORTED 230 230 0 XFAIL 16 16 0 XPASS 4 4 0 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- meta/recipes-core/glibc/glibc-version.inc | 2 +- ...dsize.h-Unify-the-header-between-arm-and-aarch64.patch | 1 + ...d-hardcoded-build-time-paths-in-the-output-binar.patch | 2 +- .../glibc/glibc/0023-qemu-stale-process.patch | 8 ++++---- meta/recipes-core/glibc/glibc_2.39.bb | 3 ++- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/meta/recipes-core/glibc/glibc-version.inc b/meta/recipes-core/glibc/glibc-version.inc index 040fc793b1..0130613936 100644 --- a/meta/recipes-core/glibc/glibc-version.inc +++ b/meta/recipes-core/glibc/glibc-version.inc @@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.39/master" PV = "2.39+git" -SRCREV_glibc ?= "3463100f2d47f2897a24ba8023a5c7aaf2d26550" +SRCREV_glibc ?= "06a70769fd0b2e1f2a3085ad50ab620282bd77b3" SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https" diff --git a/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch index 9bdfa76318..411ca55d9f 100644 --- a/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch +++ b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch @@ -14,6 +14,7 @@ Signed-off-by: Khem Raj sysdeps/aarch64/bits/wordsize.h | 11 +++++++++-- sysdeps/arm/bits/wordsize.h | 22 +--------------------- 2 files changed, 10 insertions(+), 23 deletions(-) + mode change 100644 => 120000 sysdeps/arm/bits/wordsize.h diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h index 118e59172d..ff86359fe8 100644 diff --git a/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch b/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch index b527ddffc8..9e27a51e41 100644 --- a/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch +++ b/meta/recipes-core/glibc/glibc/0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch @@ -17,7 +17,7 @@ diff --git a/support/Makefile b/support/Makefile index 362a51f882..56d2b37058 100644 --- a/support/Makefile +++ b/support/Makefile -@@ -228,9 +228,9 @@ libsupport-inhibit-o += .o +@@ -229,9 +229,9 @@ libsupport-inhibit-o += .o endif CFLAGS-support_paths.c = \ diff --git a/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch b/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch index c0a467fcec..7c44acb013 100644 --- a/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch +++ b/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch @@ -22,16 +22,16 @@ diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefil tst-sigtimedwait \ tst-sync_file_range \ tst-sysconf-iov_max \ -@@ -233,6 +232,8 @@ +@@ -234,6 +233,8 @@ tests += \ tst-timerfd \ tst-ttyname-direct \ tst-ttyname-namespace \ + # Skip this test to avoid stale qemu process + # tst-scm_rights \ # tests - + # process_madvise requires CAP_SYS_ADMIN. -@@ -270,9 +271,10 @@ +@@ -271,9 +272,10 @@ tests-time64 += \ tst-ntp_gettimex-time64 \ tst-ppoll-time64 \ tst-prctl-time64 \ @@ -41,5 +41,5 @@ diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefil + # Skip this test to avoid stale qemu process + # tst-scm_rights-time64 \ # tests-time64 - + tests-clone-internal = \ diff --git a/meta/recipes-core/glibc/glibc_2.39.bb b/meta/recipes-core/glibc/glibc_2.39.bb index e4e2a766d7..c87eb76f41 100644 --- a/meta/recipes-core/glibc/glibc_2.39.bb +++ b/meta/recipes-core/glibc/glibc_2.39.bb @@ -17,7 +17,8 @@ Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, m easier access for another. 'ASLR bypass itself is not a vulnerability.'" CVE_STATUS_GROUPS += "CVE_STATUS_STABLE_BACKPORTS" -CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602 CVE-2025-0395" +CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602 CVE-2025-0395 \ + CVE-2025-4802 CVE-2025-5702" CVE_STATUS_STABLE_BACKPORTS[status] = "cpe-stable-backport: fix available in used git hash" DEPENDS += "gperf-native bison-native" From patchwork Sun Jun 22 13:37:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65436 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96293C7115A for ; Sun, 22 Jun 2025 13:38:01 +0000 (UTC) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mx.groups.io with SMTP id smtpd.web10.26161.1750599472377670175 for ; Sun, 22 Jun 2025 06:37:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=qfNlgzh2; spf=softfail (domain: sakoman.com, ip: 209.85.210.173, mailfrom: steve@sakoman.com) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-749248d06faso871615b3a.2 for ; Sun, 22 Jun 2025 06:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750599472; x=1751204272; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=D5mjYqUhRSpyPi/KRrNzmGOxPT6RbNpErRKAkQ+ReyI=; b=qfNlgzh2oIa4b/V9FY8Kmpy11Z226Um4dabmLeO8sv7HLSKvStHK+y8Z7STYrVgmtW w6jPpKs5pFj4E/pe1m78JHhIVp29w6CMzbkhPALYtGJi2tl6u+4S0QxGrwiVcSRGG927 RKV6HElIeNFXMVwS0tJlELb+f1YJ34ORc/5tI0fDAizEsqRsw70tIua8RwdIwEsxkfsk yECqeCpWn9Nnq1rnlccDGVDj/sa1N2Z+NgpYzs6lUDLTeLr9eSHufD8ZPTiFWBxVpvXc 3FtY8zK/Ij+0g/F4lS0qK1U923mmt7GYDiOhfK+lmqVZNhjo05gza4j+MD7be9UQxO4i 8aYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750599472; x=1751204272; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D5mjYqUhRSpyPi/KRrNzmGOxPT6RbNpErRKAkQ+ReyI=; b=UOn/AfQnzcKoc1GSu9HFRzgfHlPC7uyIOt0VJWv3XO9uFcdxJl9Kf1B+nmXhiT/6O4 5lxuIettInL2KJNf9jjKEK76agUNicvv4dbknSZiBJnPAJioCfFowGxnpbCUTFfq/RXC Kqvnkr1hWj63lpoxvaFZFhc7ysLF77pWjwDi+Enop252f3G/Y6lao0WMID5kY6KWquZI m2rRkknVmdh9phgWbjGbbwi5/nPEyGz6leuTBoKwPxHotiT7b+sJYdDv0ljDC5pqBWvU 3Gke/k94UsPxHIz4605hkRlRdGWBHSK01q1OAq/GX3/FRBUrJ5b7FasYQhyhcwN4PP4+ alOw== X-Gm-Message-State: AOJu0YwoPzzuRKDh6XL2iVN36uQ3mXPKFZSol1Vzf40Jf+ZPH8xQq7ui y/3cUZ1CYcDASwJTYYnXszXP+9mR3+zRx8fV6Jp7nAygjPbwzQ5V8h/Khd/p4ptTEprA6NDl9gq Q+pwfKjI= X-Gm-Gg: ASbGnct44Oo+bWNP5XPUsomRxOMZw9JHfCFNDyw8ZS3wan8ORfncvD+cxR75yeeYgjS j9efJqmD4UthhuCx04qABbxf7lgIFK+FLJJw+/KOAk3qF1DhVZYcPiBDUfwb0WMOl42TzKlvi1x T0vx8OfP1azmzptGy5ib5tq6qiPIsu+sGk5DvUhH0Qqtk6sy8ja7bcwSvwhRY3nYh7cBKTl3Zrb rV7h6LuVbmlTLBFoTg4NzkRgDT4dgmxwoy3ux2zS0pRNWKoRBIB15RxkYgsguVSGlNx4VfbDLeT lQRQMtSQ9j4EDSXb6E0wTSGYheVGWP5gxeBRldYEAETNCmMZhYVaLA== X-Google-Smtp-Source: AGHT+IGmuM3QyiRCJNhgikagaUPs0JbICGiWcFt4YyKDBah6/MZKJBbq0cNAIaG/e2j46i56V4JGsg== X-Received: by 2002:a05:6a00:2d1b:b0:736:4644:86ee with SMTP id d2e1a72fcca58-7490d60849bmr13438118b3a.14.1750599471402; Sun, 22 Jun 2025 06:37:51 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:4a75:9ad8:d661:8bd8]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7490a6a72afsm5960189b3a.163.2025.06.22.06.37.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jun 2025 06:37:51 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 4/4] cmake: Correctly handle cost data of tests with arbitrary chars in name Date: Sun, 22 Jun 2025 06:37:32 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 22 Jun 2025 13:38:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219178 From: Moritz Haase ctest automatically optimizes the order of (parallel) test execution based on historic test case runtime via the COST property (see [0]), which can have a significant impact on overall test run times. Sadly this feature is broken in CMake < 4.0.0 for test cases that have spaces in their name (see [1]). This commit is a backport of f24178f3 (which itself backports the upstream fix). The patch was adapted slightly to apply cleanly to the older CMake version in scarthgap. As repeated test runs are expected to mainly take place inside the SDK, the patch is only applied to 'nativesdk' builds. [0]: https://cmake.org/cmake/help/latest/prop_test/COST.html [1]: https://gitlab.kitware.com/cmake/cmake/-/issues/26594 Reported-By: John Drouhard Signed-off-by: Moritz Haase Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- .../cmake/cmake-native_3.28.3.bb | 2 +- ...trary-characters-in-test-names-of-CT.patch | 205 ++++++++++++++++++ meta/recipes-devtools/cmake/cmake_3.28.3.bb | 1 + 3 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch diff --git a/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb b/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb index 546d117156..376da3254b 100644 --- a/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb +++ b/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb @@ -51,7 +51,7 @@ do_compile() { do_install() { oe_runmake 'DESTDIR=${D}' install - # The following codes are here because eSDK needs to provide compatibilty + # The following codes are here because eSDK needs to provide compatibility # for SDK. That is, eSDK could also be used like traditional SDK. mkdir -p ${D}${datadir}/cmake install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ diff --git a/meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch b/meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch new file mode 100644 index 0000000000..77c1d6378d --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch @@ -0,0 +1,205 @@ +From 49576cf1df618609be4aa1000749ad087c143df0 Mon Sep 17 00:00:00 2001 +From: John Drouhard +Date: Thu, 9 Jan 2025 20:34:42 -0600 +Subject: [PATCH] ctest: Allow arbitrary characters in test names of + CTestCostData.txt + +This changes the way lines in CTestCostData.txt are parsed to allow for +spaces in the test name. + +It does so by looking for space characters from the end; and once two +have been found, assumes everything from the beginning up to that +second-to-last-space is the test name. + +Additionally, parsing the file should be much more efficient since there +is no string or vector heap allocation per line. The std::string used by +the parse function to convert the int and float should be within most +standard libraries' small string optimization. + +Fixes: #26594 + +Upstream-Status: Backport [4.0.0, 040da7d83216ace59710407e8ce35d5fd38e1340] +Signed-off-by: Moritz Haase +--- + Source/CTest/cmCTestMultiProcessHandler.cxx | 80 +++++++++++++++------ + Source/CTest/cmCTestMultiProcessHandler.h | 3 +- + Tests/CTestTestScheduler/CMakeLists.txt | 4 +- + 3 files changed, 64 insertions(+), 23 deletions(-) + +diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx +index ca07a081eafced40697d82b08c0e2a504939fc4d..59a101454b84367d219e79a01ff72702df0dfa7f 100644 +--- a/Source/CTest/cmCTestMultiProcessHandler.cxx ++++ b/Source/CTest/cmCTestMultiProcessHandler.cxx +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include + + #include +@@ -43,6 +44,51 @@ + #include "cmUVSignalHackRAII.h" // IWYU pragma: keep + #include "cmWorkingDirectory.h" + ++namespace { ++ ++struct CostEntry ++{ ++ cm::string_view name; ++ int prevRuns; ++ float cost; ++}; ++ ++cm::optional splitCostLine(cm::string_view line) ++{ ++ std::string part; ++ cm::string_view::size_type pos1 = line.size(); ++ cm::string_view::size_type pos2 = line.find_last_of(' ', pos1); ++ auto findNext = [line, &part, &pos1, &pos2]() -> bool { ++ if (pos2 != cm::string_view::npos) { ++ cm::string_view sub = line.substr(pos2 + 1, pos1 - pos2 - 1); ++ part.assign(sub.begin(), sub.end()); ++ pos1 = pos2; ++ if (pos1 > 0) { ++ pos2 = line.find_last_of(' ', pos1 - 1); ++ } ++ return true; ++ } ++ return false; ++ }; ++ ++ // parse the cost ++ if (!findNext()) { ++ return cm::nullopt; ++ } ++ float cost = static_cast(atof(part.c_str())); ++ ++ // parse the previous runs ++ if (!findNext()) { ++ return cm::nullopt; ++ } ++ int prev = atoi(part.c_str()); ++ ++ // from start to the last found space is the name ++ return CostEntry{ line.substr(0, pos1), prev, cost }; ++} ++ ++} ++ + namespace cmsys { + class RegularExpression; + } +@@ -697,24 +743,21 @@ void cmCTestMultiProcessHandler::UpdateCostData() + if (line == "---") { + break; + } +- std::vector parts = cmSystemTools::SplitString(line, ' '); + // Format: +- if (parts.size() < 3) { ++ cm::optional entry = splitCostLine(line); ++ if (!entry) { + break; + } + +- std::string name = parts[0]; +- int prev = atoi(parts[1].c_str()); +- float cost = static_cast(atof(parts[2].c_str())); +- +- int index = this->SearchByName(name); ++ int index = this->SearchByName(entry->name); + if (index == -1) { + // This test is not in memory. We just rewrite the entry +- fout << name << " " << prev << " " << cost << "\n"; ++ fout << entry->name << " " << entry->prevRuns << " " << entry->cost ++ << "\n"; + } else { + // Update with our new average cost +- fout << name << " " << this->Properties[index]->PreviousRuns << " " +- << this->Properties[index]->Cost << "\n"; ++ fout << entry->name << " " << this->Properties[index]->PreviousRuns ++ << " " << this->Properties[index]->Cost << "\n"; + temp.erase(index); + } + } +@@ -750,28 +793,25 @@ void cmCTestMultiProcessHandler::ReadCostData() + break; + } + +- std::vector parts = cmSystemTools::SplitString(line, ' '); ++ // Format: ++ cm::optional entry = splitCostLine(line); + + // Probably an older version of the file, will be fixed next run +- if (parts.size() < 3) { ++ if (!entry) { + fin.close(); + return; + } + +- std::string name = parts[0]; +- int prev = atoi(parts[1].c_str()); +- float cost = static_cast(atof(parts[2].c_str())); +- +- int index = this->SearchByName(name); ++ int index = this->SearchByName(entry->name); + if (index == -1) { + continue; + } + +- this->Properties[index]->PreviousRuns = prev; ++ this->Properties[index]->PreviousRuns = entry->prevRuns; + // When not running in parallel mode, don't use cost data + if (this->ParallelLevel > 1 && this->Properties[index] && + this->Properties[index]->Cost == 0) { +- this->Properties[index]->Cost = cost; ++ this->Properties[index]->Cost = entry->cost; + } + } + // Next part of the file is the failed tests +@@ -784,7 +824,7 @@ void cmCTestMultiProcessHandler::ReadCostData() + } + } + +-int cmCTestMultiProcessHandler::SearchByName(std::string const& name) ++int cmCTestMultiProcessHandler::SearchByName(cm::string_view name) + { + int index = -1; + +diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h +index 3b4e9c59ad1871168d8528be0586831e2416ae36..8d33dabcf0d9fc6e11459105c65eadaa1de33e42 100644 +--- a/Source/CTest/cmCTestMultiProcessHandler.h ++++ b/Source/CTest/cmCTestMultiProcessHandler.h +@@ -12,6 +12,7 @@ + #include + + #include ++#include + + #include + +@@ -113,7 +114,7 @@ protected: + void UpdateCostData(); + void ReadCostData(); + // Return index of a test based on its name +- int SearchByName(std::string const& name); ++ int SearchByName(cm::string_view name); + + void CreateTestCostList(); + +diff --git a/Tests/CTestTestScheduler/CMakeLists.txt b/Tests/CTestTestScheduler/CMakeLists.txt +index 91d565d4020aafda6d49462cd8616d168d5844b6..daf6ce2b23d8c048334ae1047759130b246dccef 100644 +--- a/Tests/CTestTestScheduler/CMakeLists.txt ++++ b/Tests/CTestTestScheduler/CMakeLists.txt +@@ -1,9 +1,9 @@ +-cmake_minimum_required (VERSION 3.5) ++cmake_minimum_required(VERSION 3.19) + project (CTestTestScheduler) + include (CTest) + + add_executable (Sleep sleep.c) + + foreach (time RANGE 1 4) +- add_test (TestSleep${time} Sleep ${time}) ++ add_test ("TestSleep ${time}" Sleep ${time}) + endforeach () diff --git a/meta/recipes-devtools/cmake/cmake_3.28.3.bb b/meta/recipes-devtools/cmake/cmake_3.28.3.bb index 6a9a3266df..63d483801a 100644 --- a/meta/recipes-devtools/cmake/cmake_3.28.3.bb +++ b/meta/recipes-devtools/cmake/cmake_3.28.3.bb @@ -5,6 +5,7 @@ inherit cmake bash-completion DEPENDS += "curl expat zlib libarchive xz ncurses bzip2" SRC_URI:append:class-nativesdk = " \ + file://0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch \ file://OEToolchainConfig.cmake \ file://SDKToolchainConfig.cmake.template \ file://cmake-setup.py \