From patchwork Sat Jan 6 11:01:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 25251 Received: (qmail 17936 invoked by alias); 6 Jan 2018 11:02:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 16744 invoked by uid 89); 6 Jan 2018 11:01:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: hall.aurel32.net Date: Sat, 6 Jan 2018 12:01:04 +0100 From: Aurelien Jarno To: Joseph Myers , libc-alpha@sourceware.org Subject: Re: [PATCH 0/4] Fix getrlimit/setrlimit/prlimit on Alpha and 32-bit machines Message-ID: <20180106110104.GC22048@aurel32.net> Mail-Followup-To: Joseph Myers , libc-alpha@sourceware.org References: <20180105132429.21118-1-aurelien@aurel32.net> <20180106100044.GA28831@aurel32.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180106100044.GA28831@aurel32.net> User-Agent: Mutt/1.9.2 (2017-12-15) On 2018-01-06 11:00, Aurelien Jarno wrote: > On 2018-01-05 23:55, Joseph Myers wrote: > > One of these patches breaks the testsuite build for various (but not all) > > 32-bit configurations. > > > > https://sourceware.org/ml/libc-testresults/2018-q1/msg00035.html > > > > The failures are all of the form: > > > > /scratch/jmyers/glibc-bot/build/glibcs/arm-linux-gnueabi/glibc/io/test-lfs.o: In function `do_prepare': > > /scratch/jmyers/glibc-bot/build/glibcs/arm-linux-gnueabi/glibc-src/io/test-lfs.c:75: undefined reference to `getrlimit64' > > collect2: error: ld returned 1 exit status > > ../Rules:202: recipe for target '/scratch/jmyers/glibc-bot/build/glibcs/arm-linux-gnueabi/glibc/io/test-lfs' failed > > make[3]: *** [/scratch/jmyers/glibc-bot/build/glibcs/arm-linux-gnueabi/glibc/io/test-lfs] Error 1 > > Sorry about that. The issue happens on 32-bit configurations which have > a minimum version >= 2.2, and thus which don't need the 2GiB limited > compat getrlimit64. I wrongly moved one case under the #ifdef > __RLIM_T_MATCHES_RLIM64_T case, while it should have been copied > instead. > > I am currently testing the following patch: It worked fine on arm-linux-gnueabihf with no regression. Here is the full patch. From 5551e9755c3bbcd0c6682a1626eb869596d201c6 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 6 Jan 2018 11:48:16 +0100 Subject: [PATCH] getrlimit64: fix for 32-bit configurations with default version >= 2.2 Commit 24731685 ("prlimit: Translate old_rlimit from RLIM64_INFINITY to RLIM_INFINITY") broken the getrlimit64 for 32-bit configurations which do no need the 2GiB limited compat getrlimit (default version >= 2.2). This patch fixes that by restoring the weak alias in that case. Changelog: * sysdeps/unix/sysv/linux/getrlimit64 (getrlimit64) [!__RLIM_T_MATCHES_RLIM64_T] [!SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)]: Define as weak alias of __getrlimit64. Add libc_hidden_weak. --- ChangeLog | 7 +++++++ sysdeps/unix/sysv/linux/getrlimit64.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8833b1da33..303ded4877 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-01-06 Aurelien Jarno + + * sysdeps/unix/sysv/linux/getrlimit64 (getrlimit64) + [!__RLIM_T_MATCHES_RLIM64_T] + [!SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)]: Define as weak alias of + __getrlimit64. Add libc_hidden_weak. + 2018-01-06 Samuel Thibault * sysdeps/mach/hurd/i386/jmp_buf-macros.h: New file. diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c index 1cc82e364d..a14ca58096 100644 --- a/sysdeps/unix/sysv/linux/getrlimit64.c +++ b/sysdeps/unix/sysv/linux/getrlimit64.c @@ -81,4 +81,7 @@ __old_getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits) } versioned_symbol (libc, __getrlimit64, getrlimit64, GLIBC_2_2); compat_symbol (libc, __old_getrlimit64, getrlimit64, GLIBC_2_1); +#else +weak_alias (__getrlimit64, getrlimit64) +libc_hidden_weak (getrlimit64) #endif /* __RLIM_T_MATCHES_RLIM64_T */