From patchwork Sun Jul 4 12:44:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 44133 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFB8C384843D for ; Sun, 4 Jul 2021 12:45:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFB8C384843D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625402719; bh=2STeepTgT5YbFudSgpeSB+N+cLFhJ9qqpB0smgoqX70=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=WPUHUIaFRgxksoW0fhfK0KMvvlQayZEJhmZ2t95TVgJvYps8DVmHowmKrVi13WxSB sm6dEmPIYmoyBBp7TffOTwKoCo/KyhjbX9hGXlHKUV1EvOiV9rMQY7CN+ok/4ImYLT QOIUDEaQDUBaKa0dRaFw9A5B7pRMAazo7zPHXxso= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from donkey.elm.relay.mailchannels.net (donkey.elm.relay.mailchannels.net [23.83.212.49]) by sourceware.org (Postfix) with ESMTPS id 0D7A93851416 for ; Sun, 4 Jul 2021 12:44:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D7A93851416 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8D526701165 for ; Sun, 4 Jul 2021 12:44:56 +0000 (UTC) Received: from pdx1-sub0-mail-a29.g.dreamhost.com (100-101-162-64.trex.outbound.svc.cluster.local [100.101.162.64]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DDC747018CB for ; Sun, 4 Jul 2021 12:44:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a29.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.162.64 (trex/6.3.3); Sun, 04 Jul 2021 12:44:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Sponge-Lonely: 58c2f5ee75c6c162_1625402696108_513602446 X-MC-Loop-Signature: 1625402696107:1122045863 X-MC-Ingress-Time: 1625402696107 Received: from pdx1-sub0-mail-a29.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a29.g.dreamhost.com (Postfix) with ESMTP id 8AA2E7F039 for ; Sun, 4 Jul 2021 05:44:55 -0700 (PDT) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a29.g.dreamhost.com (Postfix) with ESMTPSA id 8141D7E472 for ; Sun, 4 Jul 2021 05:44:53 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a29 To: libc-alpha@sourceware.org Subject: [PATCH] glibc.malloc.check: Fix nit in documentation Date: Sun, 4 Jul 2021 18:14:45 +0530 Message-Id: <20210704124445.479444-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3492.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The tunable will not work with *any* non-zero tunable value since its list of allowed values is 0-3. Fix the documentation to reflect that. --- manual/memory.texi | 10 +++++----- manual/tunables.texi | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manual/memory.texi b/manual/memory.texi index 28ec2e4e63..31ee36be8c 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -1364,11 +1364,11 @@ The block was already freed. Another possibility to check for and guard against bugs in the use of @code{malloc}, @code{realloc} and @code{free} is to set the environment variable @code{MALLOC_CHECK_}. When @code{MALLOC_CHECK_} is set to a -non-zero value, a special (less efficient) implementation is used which -is designed to be tolerant against simple errors, such as double calls -of @code{free} with the same argument, or overruns of a single byte -(off-by-one bugs). Not all such errors can be protected against, -however, and memory leaks can result. +non-zero value less than 4, a special (less efficient) implementation is +used which is designed to be tolerant against simple errors, such as +double calls of @code{free} with the same argument, or overruns of a +single byte (off-by-one bugs). Not all such errors can be protected +against, however, and memory leaks can result. Any detected heap corruption results in immediate termination of the process. diff --git a/manual/tunables.texi b/manual/tunables.texi index d5d957fb5b..ebdb562e36 100644 --- a/manual/tunables.texi +++ b/manual/tunables.texi @@ -115,7 +115,7 @@ following tunables in the @code{malloc} namespace: This tunable supersedes the @env{MALLOC_CHECK_} environment variable and is identical in features. -Setting this tunable to a non-zero value enables a special (less +Setting this tunable to a non-zero value less than 4 enables a special (less efficient) memory allocator for the @code{malloc} family of functions that is designed to be tolerant against simple errors such as double calls of free with the same argument, or overruns of a single byte (off-by-one