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 B6E093858C50 for ; Fri, 17 Mar 2023 22:40:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6E093858C50 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=1679092808; h=from:from: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=R4c1oQrtCGJ/sFYs0/BOH365yw6KpVHFGnLNr4YS/t8=; b=hNmwIr8cDHDWY4P15YhpkVzpn2stPzHfR0Z3VMv8FWIV/XqCfuQAt7XbU7RmHnAN8Dq6i5 jM8FMMeupVG0Iel5aqCJmn2y5w5IWclS3oQ8c5+MxyDVzOAd9GKTkTXfAGUN9TvytieiNC nWS4mkNfZt/lDMGzjXJSEzIF/jGn8qA= 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-310-z6RwJqYxN8a6evmB8gw1LA-1; Fri, 17 Mar 2023 18:40:07 -0400 X-MC-Unique: z6RwJqYxN8a6evmB8gw1LA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3BA83806624 for ; Fri, 17 Mar 2023 22:40:06 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E334D35454; Fri, 17 Mar 2023 22:40:05 +0000 (UTC) From: Florian Weimer To: DJ Delorie Cc: libc-alpha@sourceware.org Subject: Re: [patch v2] aligned_alloc: conform to C17 References: Date: Fri, 17 Mar 2023 23:40:04 +0100 In-Reply-To: (DJ Delorie's message of "Fri, 17 Mar 2023 18:10:58 -0400") Message-ID: <87a60bt323.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * DJ Delorie: > Florian Weimer writes: >> Why do we need to export the __libc_aligned_alloc symbol? That doesn't >> seem to be right. We should simply change the behavior of the existing >> aligned_alloc symbol. > > I did it only because memalign has a __libc_memalign symbol. The old > symbol used to be a weak alias for __libc_memalign, so to change it, we > need a separate function - which would thus be __libc_aligned_alloc, so > that aligned_alloc() can continue to be a weak function. None of this should alter the exported symbol list, though. It is possible to use versioned_symbol, libc_hidden_ver, maybe with #ifdef SHARED conditionals, to avoid the need for additional exported signal. __libc_memalign was added when we started using it in the dynamic loader by mistake. That has now been fixed, and maybe we should turn it into a compat symbol. >> If you do not want to change behavior for existing binaries (why?), > > I'm going on the premise that aligned_alloc() is new to C11 and was > always documented to fail in the way I'm making it now fail (although > there are other "documented to fail" cases we're not implementing). > Thus there is no need to support a pre-C11 functionality. Sounds good to me. Thanks, Florian