From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SEbqMXUtwWEPJAAAgWs5BA (envelope-from ) for ; Tue, 21 Dec 2021 02:27:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aOW2LXUtwWF2dgAAB5/wlQ (envelope-from ) for ; Tue, 21 Dec 2021 01:27:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6BEF5C2A5 for ; Tue, 21 Dec 2021 02:27:17 +0100 (CET) Received: from localhost ([::1]:35336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzTvw-0006wa-6L for larch@yhetil.org; Mon, 20 Dec 2021 20:27:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzTvi-0006w8-Dw for guix-patches@gnu.org; Mon, 20 Dec 2021 20:27:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40281) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzTvi-0005qQ-5r for guix-patches@gnu.org; Mon, 20 Dec 2021 20:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzTvh-0004qx-VE for guix-patches@gnu.org; Mon, 20 Dec 2021 20:27:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52693] [PATCH] gnu: glibc: Handle failure to find $ORIGIN. Resent-From: Ivan Kozlov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 01:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52693 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52693@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164004997018579 (code B ref -1); Tue, 21 Dec 2021 01:27:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2021 01:26:10 +0000 Received: from localhost ([127.0.0.1]:51824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzTuo-0004pY-J3 for submit@debbugs.gnu.org; Mon, 20 Dec 2021 20:26:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:36978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzTuk-0004pO-Nb for submit@debbugs.gnu.org; Mon, 20 Dec 2021 20:26:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzTuk-0006oV-5q for guix-patches@gnu.org; Mon, 20 Dec 2021 20:26:02 -0500 Received: from forward401j.mail.yandex.net ([5.45.198.233]:52462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzTuf-0005ls-VB for guix-patches@gnu.org; Mon, 20 Dec 2021 20:26:01 -0500 Received: from myt6-06c5907de372.qloud-c.yandex.net (myt6-06c5907de372.qloud-c.yandex.net [IPv6:2a02:6b8:c12:42ad:0:640:6c5:907d]) by forward401j.mail.yandex.net (Yandex) with ESMTP id 0FE4F1ACDD71 for ; Tue, 21 Dec 2021 04:25:51 +0300 (MSK) Received: from 2a02:6b8:c12:2487:0:640:27f5:8919 (2a02:6b8:c12:2487:0:640:27f5:8919 [2a02:6b8:c12:2487:0:640:27f5:8919]) by myt6-06c5907de372.qloud-c.yandex.net (mxback/Yandex) with HTTP id nPVAIG1euOs1-PoeOn0KN; Tue, 21 Dec 2021 04:25:50 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1640049950; bh=vNedbYRM0BmxtLZTQrsPEBRvufpFKdZhYPrirTd6UuM=; h=Message-Id:Date:Subject:To:From; b=LUFCZhvGFwrNL9gU5FO4bFqrf6t8jifMC1mO95ywGrEDCKtvFbj+hVBhVbX7dAuxq +9XL6DTxhKH8I7n3VjrqZRIr99lYmEFzoWsNaoK2ia6ZTnR+s+js3HnAoukf18mtT2 6zW4Nq4mHadNn9gKxRKfkkTiz4GgePAs+QKzefaA= Received: by myt6-27f58919b1c4.qloud-c.yandex.net with HTTP; Tue, 21 Dec 2021 04:25:50 +0300 From: Ivan Kozlov MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 21 Dec 2021 04:25:50 +0300 Message-Id: <12919001640049950@myt6-27f58919b1c4.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Received-SPF: pass client-ip=5.45.198.233; envelope-from=kanichos@yandex.ru; helo=forward401j.mail.yandex.net 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, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640050037; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vNedbYRM0BmxtLZTQrsPEBRvufpFKdZhYPrirTd6UuM=; b=ZfuFTJHvvQiCpIQCqTaGUQGNZoi5acxn92MgcEeyL/azHXsxa1kzxJvKyGagSJ5tJzgQRR H9TSovKgSLLlmzAzjP2TksyXYi8R9JxDLhpmUb1B9Ja3nXJQgbhtzGnO39JReGOG7LxxOb xVHTTjrnd6XWupt+pd1milZjazN3kAY6u6ZLe/p36n8Es+AoaUVEx9wdG+Lfsx4e0GFizj q+Buv1duGjVQ1baSj4ISMUXs1VY5pNrK3qDV0VvBXCu/LC2LW952TzQcLi+8ZEXWqFaOph bf8+chuKgEsfVruaL2ihFxUUuuC7W2Okoz12FvGo28gCeNyMq8SsY2orJVt/Pw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640050037; a=rsa-sha256; cv=none; b=OKp+HgzZhgyZWIViq1jb+Blf/MdM3JDcFf51Lgm+Hk2V3nbbsBYal9GGu7Kb2EMbqJK+/A abHC79uaHxoOMSo9v0RQnniGcaB5CzI88drOpDhlOAKu6JNkZdRwGfQmcK3NjukGPrgtyU 260qMedUZcYIsGoR1U9UwOBz2lE5hQAd/r4wgyw6cG2ImmRH0Cju6J2lOrpdaLVmLK/oD8 yGNQEH0QBTPqQ3+Is+zsANUh2P/DD2/V8sXTVeT75H+aRzQOHhWb0YWEz+P2ZLIsi8ps2j d7CamUBjLWgEI5iHk29ByT0NP+EpSdAzg8nMmCBvb6zoD6i3GSLLmeRykbdnYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yandex.ru header.s=mail header.b=LUFCZhvG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yandex.ru (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yandex.ru header.s=mail header.b=LUFCZhvG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yandex.ru (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6BEF5C2A5 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: HiLR8+5PvX8z Fixes . * gnu/packages/patches/glibc-dl-cache.patch: Check pointer returned by '_dl_get_origin' for failure indication. --- gnu/packages/patches/glibc-dl-cache.patch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/patches/glibc-dl-cache.patch b/gnu/packages/patches/glibc-dl-cache.patch index 68c3a94846..1535e8e9c9 100644 --- a/gnu/packages/patches/glibc-dl-cache.patch +++ b/gnu/packages/patches/glibc-dl-cache.patch @@ -3,10 +3,10 @@ from /etc/ld.so.cache. Also arrange so that this cache takes precedence over RUNPATH. diff --git a/elf/dl-cache.c b/elf/dl-cache.c -index 93d185e788..e0760a1f40 100644 +index 93d185e788..801452692d 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c -@@ -171,6 +171,51 @@ _dl_cache_libcmp (const char *p1, const char *p2) +@@ -171,6 +171,52 @@ _dl_cache_libcmp (const char *p1, const char *p2) return *p1 - *p2; } @@ -27,7 +27,8 @@ index 93d185e788..e0760a1f40 100644 + const char *origin = _dl_get_origin (); + + /* Check whether ORIGIN is something like "/gnu/store/…-foo/bin". */ -+ if (strncmp (store, origin, strlen (store)) == 0 ++ if (origin != (char *)-1 /* _dl_get_origin reported failure */ ++ && strncmp (store, origin, strlen (store)) == 0 + && origin[sizeof store - 1] == '/') + { + char *store_item_end = strchr (origin + sizeof store, '/'); @@ -58,7 +59,7 @@ index 93d185e788..e0760a1f40 100644 /* Look up NAME in ld.so.cache and return the file name stored there, or null if none is found. The cache is loaded if it was not already. If loading -@@ -190,12 +235,15 @@ _dl_load_cache_lookup (const char *name) +@@ -190,12 +236,15 @@ _dl_load_cache_lookup (const char *name) /* Print a message if the loading of libs is traced. */ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) base-commit: 88b4dcdabe512992ae79a50fc333e4e463d91634 -- 2.28.0