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 3279A3858D20 for ; Fri, 3 Feb 2023 12:11:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3279A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675426315; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=GBHvrHW1FC03OWyZLV6rrtZY8e2/VkYR7rNstElil6M=; b=bC8V6rxAFCm24ZPQ1xhb807L7SATF4uq/ZLf6NsCXD3mXth+VUHZu+DkOH68Aa1hTUURS+ juXXTBy70gII3AECaVDEu94PHCVK3z7sr2QHoerJK9APFZCOUTorodf8QSItJAcTtif7Zc VWqVuWLHEO2CpdvoBnAR5WDCSFupGLU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-294-M-5ht1rpOZiFxvsQfIAGmQ-1; Fri, 03 Feb 2023 07:11:54 -0500 X-MC-Unique: M-5ht1rpOZiFxvsQfIAGmQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 92DE63C0F689; Fri, 3 Feb 2023 12:11:54 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.192.107]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D211492B15; Fri, 3 Feb 2023 12:11:54 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 33B49A80B94; Fri, 3 Feb 2023 13:11:53 +0100 (CET) Date: Fri, 3 Feb 2023 13:11:53 +0100 From: Corinna Vinschen To: "H. Peter Anvin" Cc: newlib@sourceware.org Subject: Re: malloc() fails to compile with --enable-newlib-reent-thread-local Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: "H. Peter Anvin" , newlib@sourceware.org References: <23548fc0-b5cb-8c3c-4a52-15a58c1da395@zytor.com> MIME-Version: 1.0 In-Reply-To: <23548fc0-b5cb-8c3c-4a52-15a58c1da395@zytor.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Feb 2 19:51, H. Peter Anvin wrote: > Hi, > > as of newlib-4.3.0 (git 9e09d6ed83cce4777a5950412647ccc603040409) malloc() > fails to compile with the following options set: > > --disable-newlib-fseek-optimization \ > --disable-newlib-fvwrite-in-streamio \ > --disable-newlib-mb \ > --disable-newlib-reent-check-verify \ > --disable-newlib-register-fini \ > --disable-newlib-supplied-syscalls \ > --disable-newlib-unbuf-stream-opt \ > --disable-newlib-wide-orient \ > --enable-lite-exit \ > --enable-target-optspace \ > --enable-newlib-multithread \ > --enable-newlib-global-atexit \ > --enable-newlib-nano-formatted-io \ > --enable-newlib-io-c99-formats \ > --enable-newlib-reent-thread-local \ > --enable-newlib-nano-malloc > > (same effect without --enable-newlib-nano-malloc). > > The reason is that the malloc() routines appear to hard-code the use of > "reent_ptr->_errno" instead of using _REENT_ERRNO(), but if I'm not > completely out to sea it really shouldn't be using "reent_ptr" at all, > similar to the !_LIBC case? Yeah, looks like it. Patches welcome! Thanks, Corinna