From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18882 invoked by alias); 12 Nov 2018 12:42:59 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 18870 invoked by uid 89); 12 Nov 2018 12:42:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=*user, MESSAGE, nss X-Spam-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-qk1-f181.google.com Received: from mail-qk1-f181.google.com (HELO mail-qk1-f181.google.com) (209.85.222.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Nov 2018 12:42:57 +0000 Received: by mail-qk1-f181.google.com with SMTP id 131so12957516qkd.4 for ; Mon, 12 Nov 2018 04:42:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:openpgp:organization:message-id :date:user-agent:mime-version:content-language; bh=vxAGa2OXX9wc1VDC/YSgbHGc4kw9XTwCjBq1LfYSpw0=; b=WcpcqdOvWGAW0pxB+V+XTruyDr+0SPrNjJCF8IMW2LUY/Y85vgwmK3m0FnRhfTCuTg OCh91QqDegyhUXLU94IkCt7lPeibjsOOEyuzCCcoPUlIThOQil7l932bGQ+/TvIwCVYg /uXP82/p2qeRGh+1pCAAjNxSxqXavGT3z46Rt4Ay2kxBxCqQX+Ao8klU2rL73L4eayC4 427AgpyxHBBXyHx8eHSZhPvpfiCRXiTKxpdJf8VA0IuxDhNt7pxvtlyUiig522k58MhW rqSdCe4psqKK0Ha/2diC3nrl+Vdli67Oq6SJapUOpbqOaVVwQ1B1a/dOsfWJz0GrL/9w TCMQ== X-Gm-Message-State: AGRZ1gIECaSkZlngm9AgtY56ZiG0i1vTHAlwysgEVDL91ToRYUDqora6 5DmzFY1TLN2gLx760MmEc30/efH4VFolHQ== X-Google-Smtp-Source: AJdET5c6ydwZtsCnXClPVR702r8hih8dISJ2cDxt/c09GdDSYOTl6tV/JauexwMVsEFc5YmM5TPUiQ== X-Received: by 2002:a0c:9dc6:: with SMTP id p6mr721656qvf.217.1542026574992; Mon, 12 Nov 2018 04:42:54 -0800 (PST) Received: from [10.150.73.190] (97.sub-174-227-17.myvzw.com. [174.227.17.97]) by smtp.gmail.com with ESMTPSA id 33sm13289630qto.14.2018.11.12.04.42.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 04:42:54 -0800 (PST) To: "GNU C Library (Stable)" From: Carlos O'Donell Subject: [2.28 COMMITTED] Add newlines in __libc_fatal calls. Openpgp: preference=signencrypt Organization: Red Hat Message-ID: Date: Mon, 01 Jan 2018 00:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------CC143C781FE1DC6CC8B45DF9" Content-Language: en-US X-SW-Source: 2018-11/txt/msg00021.txt.bz2 This is a multi-part message in MIME format. --------------CC143C781FE1DC6CC8B45DF9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 1262 Tested on x86_64. build-many-glibcs run in progress. -- [BZ #20271] Add newlines in __libc_fatal calls. (cherry picked from commit a6e8926f8d49a213a9abb1a61f6af964f612ab7f) --- ChangeLog | 22 +++++++++++++++++++ grp/initgroups.c | 2 +- include/stdio.h | 3 ++- nptl/pthread_cond_wait.c | 2 +- nscd/initgrcache.c | 2 +- nss/nsswitch.c | 2 +- sysdeps/aarch64/dl-irel.h | 2 +- sysdeps/arm/dl-irel.h | 2 +- sysdeps/generic/unwind-dw2.c | 2 +- sysdeps/i386/dl-irel.h | 2 +- sysdeps/nptl/futex-internal.h | 2 +- sysdeps/powerpc/powerpc32/dl-irel.h | 2 +- sysdeps/powerpc/powerpc64/dl-irel.h | 2 +- sysdeps/s390/dl-irel.h | 2 +- sysdeps/sparc/sparc32/dl-irel.h | 2 +- sysdeps/sparc/sparc64/dl-irel.h | 2 +- .../unix/sysv/linux/netlink_assert_response.c | 4 ++-- sysdeps/x86_64/dl-irel.h | 2 +- 18 files changed, 41 insertions(+), 18 deletions(-) -- Cheers, Carlos. --------------CC143C781FE1DC6CC8B45DF9 Content-Type: text/x-patch; name="0006-BZ-20271-Add-newlines-in-__libc_fatal-calls.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0006-BZ-20271-Add-newlines-in-__libc_fatal-calls.patch" Content-length: 11270 >From 9071be6b3f78da905ab2b6403933fe14d4482e47 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Fri, 31 Aug 2018 18:04:32 -0700 Subject: [PATCH 6/8] [BZ #20271] Add newlines in __libc_fatal calls. (cherry picked from commit a6e8926f8d49a213a9abb1a61f6af964f612ab7f) --- ChangeLog | 22 +++++++++++++++++++ grp/initgroups.c | 2 +- include/stdio.h | 3 ++- nptl/pthread_cond_wait.c | 2 +- nscd/initgrcache.c | 2 +- nss/nsswitch.c | 2 +- sysdeps/aarch64/dl-irel.h | 2 +- sysdeps/arm/dl-irel.h | 2 +- sysdeps/generic/unwind-dw2.c | 2 +- sysdeps/i386/dl-irel.h | 2 +- sysdeps/nptl/futex-internal.h | 2 +- sysdeps/powerpc/powerpc32/dl-irel.h | 2 +- sysdeps/powerpc/powerpc64/dl-irel.h | 2 +- sysdeps/s390/dl-irel.h | 2 +- sysdeps/sparc/sparc32/dl-irel.h | 2 +- sysdeps/sparc/sparc64/dl-irel.h | 2 +- .../unix/sysv/linux/netlink_assert_response.c | 4 ++-- sysdeps/x86_64/dl-irel.h | 2 +- 18 files changed, 41 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79d303e7b6..5145768a45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2018-08-31 Paul Pluzhnikov + + [BZ #20271] + * include/stdio.h (__libc_fatal): Mention newline in comment. + * grp/initgroups.c (internal_getgrouplist): Add missing newline. + * nptl/pthread_cond_wait.c (__pthread_cond_wait_common): Likewise. + * nscd/initgrcache.c (addinitgroupsX): Likewise. + * nss/nsswitch.c (__nss_next2): Likewise. + * sysdeps/aarch64/dl-irel.h (elf_irela): Likewise. + * sysdeps/arm/dl-irel.h (elf_irel): Likewise. + * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Likewise. + * sysdeps/i386/dl-irel.h (elf_irel): Likewise. + * sysdeps/powerpc/powerpc32/dl-irel.h (elf_irel): Likewise. + * sysdeps/powerpc/powerpc64/dl-irel.h (elf_irel): Likewise. + * sysdeps/s390/dl-irel.h (elf_irel): Likewise. + * sysdeps/sparc/sparc32/dl-irel.h (elf_irel): Likewise. + * sysdeps/sparc/sparc64/dl-irel.h (elf_irel): Likewise. + * sysdeps/x86_64/dl-irel.h (elf_irel): Likewise. + * sysdeps/nptl/futex-internal.h (futex_wake): Likewise. + * sysdeps/unix/sysv/linux/netlink_assert_response.c + (__netlink_assert_response): Likewise. + 2018-08-28 Florian Weimer [BZ #23520] diff --git a/grp/initgroups.c b/grp/initgroups.c index f056fbf5aa..93e7f5814d 100644 --- a/grp/initgroups.c +++ b/grp/initgroups.c @@ -128,7 +128,7 @@ internal_getgrouplist (const char *user, gid_t group, long int *size, /* This is really only for debugging. */ if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN) - __libc_fatal ("illegal status in internal_getgrouplist"); + __libc_fatal ("Illegal status in internal_getgrouplist.\n"); /* For compatibility reason we will continue to look for more entries using the next service even though data has already diff --git a/include/stdio.h b/include/stdio.h index 9162d4e247..7a5c09089f 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -98,7 +98,8 @@ enum __libc_message_action do_backtrace = 1 << 1 /* Backtrace. */ }; -/* Print out MESSAGE on the error output and abort. */ +/* Print out MESSAGE (which should end with a newline) on the error output + and abort. */ extern void __libc_fatal (const char *__message) __attribute__ ((__noreturn__)); extern void __libc_message (enum __libc_message_action action, diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c index 3e11054182..ebf07ca82d 100644 --- a/nptl/pthread_cond_wait.c +++ b/nptl/pthread_cond_wait.c @@ -516,7 +516,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec rt; if (__clock_gettime (CLOCK_MONOTONIC, &rt) != 0) __libc_fatal ("clock_gettime does not support " - "CLOCK_MONOTONIC"); + "CLOCK_MONOTONIC\n"); /* Convert the absolute timeout value to a relative timeout. */ rt.tv_sec = abstime->tv_sec - rt.tv_sec; diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index 2c74951f57..4764f14a45 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -159,7 +159,7 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, /* This is really only for debugging. */ if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN) - __libc_fatal ("illegal status in internal_getgrouplist"); + __libc_fatal ("Illegal status in internal_getgrouplist.\n"); any_success |= status == NSS_STATUS_SUCCESS; diff --git a/nss/nsswitch.c b/nss/nsswitch.c index ee46f24424..3c48b4b85e 100644 --- a/nss/nsswitch.c +++ b/nss/nsswitch.c @@ -235,7 +235,7 @@ __nss_next2 (service_user **ni, const char *fct_name, const char *fct2_name, /* This is really only for debugging. */ if (__builtin_expect (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN, 0)) - __libc_fatal ("illegal status in __nss_next"); + __libc_fatal ("Illegal status in __nss_next.\n"); if (nss_next_action (*ni, status) == NSS_ACTION_RETURN) return 1; diff --git a/sysdeps/aarch64/dl-irel.h b/sysdeps/aarch64/dl-irel.h index 5889ee187b..bef71ed0f3 100644 --- a/sysdeps/aarch64/dl-irel.h +++ b/sysdeps/aarch64/dl-irel.h @@ -47,7 +47,7 @@ elf_irela (const ElfW(Rela) *reloc) *reloc_addr = value; } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h index a7b6456075..be6eb7743e 100644 --- a/sysdeps/arm/dl-irel.h +++ b/sysdeps/arm/dl-irel.h @@ -46,7 +46,7 @@ elf_irel (const Elf32_Rel *reloc) *reloc_addr = value; } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/generic/unwind-dw2.c b/sysdeps/generic/unwind-dw2.c index 082609b34a..724c16a7f0 100644 --- a/sysdeps/generic/unwind-dw2.c +++ b/sysdeps/generic/unwind-dw2.c @@ -843,7 +843,7 @@ execute_cfa_program (const unsigned char *insn_ptr, struct frame_state_reg_info *old_rs = fs->regs.prev; #ifdef _LIBC if (old_rs == NULL) - __libc_fatal ("invalid DWARF unwind data"); + __libc_fatal ("Invalid DWARF unwind data.\n"); else #endif { diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h index 55303180c7..bcaf0668ac 100644 --- a/sysdeps/i386/dl-irel.h +++ b/sysdeps/i386/dl-irel.h @@ -45,7 +45,7 @@ elf_irel (const Elf32_Rel *reloc) *reloc_addr = value; } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index 1a5624789d..6fd27f0df6 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -197,7 +197,7 @@ futex_wake (unsigned int* futex_word, int processes_to_wake, int private); static __always_inline __attribute__ ((__noreturn__)) void futex_fatal_error (void) { - __libc_fatal ("The futex facility returned an unexpected error code."); + __libc_fatal ("The futex facility returned an unexpected error code.\n"); } #endif /* futex-internal.h */ diff --git a/sysdeps/powerpc/powerpc32/dl-irel.h b/sysdeps/powerpc/powerpc32/dl-irel.h index a7368b2582..61d0e4cf61 100644 --- a/sysdeps/powerpc/powerpc32/dl-irel.h +++ b/sysdeps/powerpc/powerpc32/dl-irel.h @@ -46,7 +46,7 @@ elf_irela (const Elf32_Rela *reloc) *reloc_addr = value; } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/powerpc/powerpc64/dl-irel.h b/sysdeps/powerpc/powerpc64/dl-irel.h index ab13c04358..2fd0ee8a86 100644 --- a/sysdeps/powerpc/powerpc64/dl-irel.h +++ b/sysdeps/powerpc/powerpc64/dl-irel.h @@ -57,7 +57,7 @@ elf_irela (const Elf64_Rela *reloc) #endif } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/s390/dl-irel.h b/sysdeps/s390/dl-irel.h index d8ba7ba427..ecb24f0a9b 100644 --- a/sysdeps/s390/dl-irel.h +++ b/sysdeps/s390/dl-irel.h @@ -46,7 +46,7 @@ elf_irela (const ElfW(Rela) *reloc) *reloc_addr = value; } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/sparc/sparc32/dl-irel.h b/sysdeps/sparc/sparc32/dl-irel.h index ffca36864f..cf47cda834 100644 --- a/sysdeps/sparc/sparc32/dl-irel.h +++ b/sysdeps/sparc/sparc32/dl-irel.h @@ -56,7 +56,7 @@ elf_irela (const Elf32_Rela *reloc) else if (r_type == R_SPARC_NONE) ; else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/sparc/sparc64/dl-irel.h b/sysdeps/sparc/sparc64/dl-irel.h index c5cd3057ac..446fed1836 100644 --- a/sysdeps/sparc/sparc64/dl-irel.h +++ b/sysdeps/sparc/sparc64/dl-irel.h @@ -59,7 +59,7 @@ elf_irela (const Elf64_Rela *reloc) else if (r_type == R_SPARC_NONE) ; else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ diff --git a/sysdeps/unix/sysv/linux/netlink_assert_response.c b/sysdeps/unix/sysv/linux/netlink_assert_response.c index f31ccb52ff..6afc3a17ce 100644 --- a/sysdeps/unix/sysv/linux/netlink_assert_response.c +++ b/sysdeps/unix/sysv/linux/netlink_assert_response.c @@ -72,12 +72,12 @@ __netlink_assert_response (int fd, ssize_t result) char message[200]; if (family < 0) __snprintf (message, sizeof (message), - "Unexpected error %d on netlink descriptor %d", + "Unexpected error %d on netlink descriptor %d.\n", error_code, fd); else __snprintf (message, sizeof (message), "Unexpected error %d on netlink descriptor %d" - " (address family %d)", + " (address family %d).\n", error_code, fd, family); __libc_fatal (message); } diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h index 6ecc50fb42..33f100d8b1 100644 --- a/sysdeps/x86_64/dl-irel.h +++ b/sysdeps/x86_64/dl-irel.h @@ -45,7 +45,7 @@ elf_irela (const ElfW(Rela) *reloc) *reloc_addr = value; } else - __libc_fatal ("unexpected reloc type in static binary"); + __libc_fatal ("Unexpected reloc type in static binary.\n"); } #endif /* dl-irel.h */ -- 2.17.2 --------------CC143C781FE1DC6CC8B45DF9--