From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 00ED43858D28 for ; Wed, 15 Dec 2021 17:44:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 00ED43858D28 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-100-_F0WbUnHMCGFus8Kx3WbRQ-1; Wed, 15 Dec 2021 12:44:12 -0500 X-MC-Unique: _F0WbUnHMCGFus8Kx3WbRQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DEFAF806668; Wed, 15 Dec 2021 17:43:57 +0000 (UTC) Received: from greed.delorie.com (ovpn-112-7.rdu2.redhat.com [10.10.112.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 576F24E2B8; Wed, 15 Dec 2021 17:43:57 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 1BFHhtvX4143579; Wed, 15 Dec 2021 12:43:55 -0500 From: DJ Delorie To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, siddhesh@sourceware.org, nmanthey@conp-solutions.com, guillaume@morinfr.org Subject: Re: [PATCH v5 4/7] malloc: Add Huge Page support for mmap() In-Reply-To: Date: Wed, 15 Dec 2021 12:43:55 -0500 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable 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-List-Received-Date: Wed, 15 Dec 2021 17:44:17 -0000 Adhemerval Zanella writes: >>> + buf[r - 1] = '\0'; >> >> This always overwrites the last byte of the file, shouldn't this be >> buf[r] ? > > Yes, I have fixed it. > > Is this patch ok with the above fix? Yes. Reviewed-by: DJ Delorie