From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2054.outbound.protection.outlook.com [40.107.22.54]) by sourceware.org (Postfix) with ESMTPS id ECF7F38930FB for ; Wed, 20 May 2020 08:54:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ECF7F38930FB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Szabolcs.Nagy@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TPGOIM5Am3/6vElnZZoB1AiLDoBnci8AlNuthgZh7Ug=; b=TgxihAERxgPxF7xjUbktWrHIbn6UOgR7nw+efryY5NRnX4n1BusnUD6f0M1GxilZkXwCBt3dnG/G1/cq1fvKg2qENRXkXEARMr0G06gA6kwpaRjcWwrNCyt/wyKJb+HO1PknVK8P77shidg88POSpCaBw2mC4CWT51hUHJaohAg= Received: from AM6PR05CA0025.eurprd05.prod.outlook.com (2603:10a6:20b:2e::38) by VI1PR08MB3629.eurprd08.prod.outlook.com (2603:10a6:803:7f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Wed, 20 May 2020 08:54:48 +0000 Received: from AM5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2e:cafe::d0) by AM6PR05CA0025.outlook.office365.com (2603:10a6:20b:2e::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Wed, 20 May 2020 08:54:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT025.mail.protection.outlook.com (10.152.16.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Wed, 20 May 2020 08:54:47 +0000 Received: ("Tessian outbound facc38080784:v57"); Wed, 20 May 2020 08:54:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c8c773f37b821e8c X-CR-MTA-TID: 64aa7808 Received: from 4c210ebbc9fd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3CA0843D-474C-42DC-BCEA-CBD0717EE095.1; Wed, 20 May 2020 08:54:42 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4c210ebbc9fd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 20 May 2020 08:54:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=izB/6AM3epvkIn4nA3NmBN8iPRzs1Oq7rYxyu6Xu/piM5IxpWkNko8yIjwFn3jP8+/AK+w9skNYReTx1sUUsSuvtNNBz+52ZpyQmWurAJNkQoa5LhdqbrK9g5heHSr+JYs+qv/SFmEGmAk8WrKz5/e8dqh9yHzNkxXTBHzgkD9IBPyeso7MHJ8CKDLhslFQ71CR2zJ8MhWySA+945C7Q8JD7tlxSCPWXR9+T+Q8YroQvGBqd5GeTfDhMRfbmSaGKZv6auFYpivx8O2YXyyzEapXiWLrLA5OIuu8IxtqFlR9egbdcR0R6yFk54/iSkAib46L4gUE3yf/pYvzG7xNMfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TPGOIM5Am3/6vElnZZoB1AiLDoBnci8AlNuthgZh7Ug=; b=HZCgY112zc2HJIolvytVMjNDh+7O8+y7P9wV8DU9wAB+57B2AsahlPtjnxm5XLWWJ5E8n0zl+KmX+e9/cWTrCw4ENJBEpUEJzXRGnTfgufjW3bYxFOH/FAKGVHYXv3VBkazkhaoVHnYBDfYpM8cxdJC/rnyGH1K1u7CY7PdL+kk9pljFMM70/ZVJW2tGRWjBBt9NhcCCP1sNfBCSk57iJm1hvwg5v4EzSoXR1JS7WwgEOtg6Oca3khvFeFkHiNxf+m+MYUbCAkAdShM1BWluTZ1/pVLixUGxMeQ0pT0hud2+aowTU1CCFMTlOJo0vcVcyF3RRHhkfITv/LodGEGgqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TPGOIM5Am3/6vElnZZoB1AiLDoBnci8AlNuthgZh7Ug=; b=TgxihAERxgPxF7xjUbktWrHIbn6UOgR7nw+efryY5NRnX4n1BusnUD6f0M1GxilZkXwCBt3dnG/G1/cq1fvKg2qENRXkXEARMr0G06gA6kwpaRjcWwrNCyt/wyKJb+HO1PknVK8P77shidg88POSpCaBw2mC4CWT51hUHJaohAg= Authentication-Results-Original: embedded-brains.de; dkim=none (message not signed) header.d=none;embedded-brains.de; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM6PR08MB3736.eurprd08.prod.outlook.com (2603:10a6:20b:87::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24; Wed, 20 May 2020 08:54:41 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862%7]) with mapi id 15.20.3021.020; Wed, 20 May 2020 08:54:41 +0000 Date: Wed, 20 May 2020 09:54:39 +0100 From: Szabolcs Nagy To: Sebastian Huber Cc: newlib@sourceware.org Subject: Re: [PATCH] Reimplement aligned_alloc Message-ID: <20200520085438.GK27289@arm.com> References: <20200519095249.22326-1-szabolcs.nagy@arm.com> <54ce748b-051a-ac74-dd3e-c5e461289eae@embedded-brains.de> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <54ce748b-051a-ac74-dd3e-c5e461289eae@embedded-brains.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0252.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::24) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.55) by LO2P265CA0252.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Wed, 20 May 2020 08:54:40 +0000 X-Originating-IP: [217.140.106.55] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3fe99aac-94da-49c6-a230-08d7fc9b732d X-MS-TrafficTypeDiagnostic: AM6PR08MB3736:|VI1PR08MB3629: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: hdVYrFZodcBW/iVrfJcnnVrVNefLuplvIejoY7EIl3wOtCDl6Jibg9IJkoENNws1sQZcEEBK1RkPuWLUBjTbf14Un6VJ5F6n2XLTLKAEQGX8u3/NJStjSwwTtutfdXLHMh7Qx7kXBP2I+n9htBX5t8DyNlRfpw2YiZ9D2eUc4q2n7yEqGYBEdLlSziWS2ihJwThuAxVfoalCt9uyMrVM4WZv4LjwDW1d5ML1GhYX+W2po6qlgkjNlbhJfFuyveGzGnu7rl6hviSuk6AAwuwvcm+vxO9JZSS/rSGPa+qmf7cl9U8AMCUie/jZ0Z0bPDy0t4fuq2fd7yQcX4tndyF40NHqCUINcuiEQrKAScLd5OuPFNdRCUai/Rw05+yV6R+NOtNr8vWgrPZkCuMU5rom2SGNK9BUBE5gNnQAALu7Om+WYnfIX3VOwEgqP+93ddbs X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3047.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39860400002)(376002)(396003)(346002)(136003)(66946007)(16526019)(66476007)(26005)(53546011)(186003)(4744005)(66556008)(478600001)(4326008)(1076003)(36756003)(5660300002)(8676002)(8886007)(7696005)(2616005)(956004)(44832011)(6916009)(86362001)(52116002)(316002)(8936002)(55016002)(2906002)(33656002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GP0hVBW8QtMDa/Blbm8IltXl7Jp1lGUJ0dIf0P0F8y7DMHQTMMDdZlOaTeh6TNJXCEjkC1KUzZgFfq9QXHdZlfTfUIw7jRr4jB+3u5jHkaRY8zALH2y+ka84RbLOPj4JebINz0eg1Io3cGfnyHaW5zB0zbAmYSJsKHyCkI9ZXDjptOFUgrrndgnWSR6p/IOihCPQTEzTle6u/K0BdYKaw6MiKSoyBmEw3IbcOxEKZKDnzvPuxjw7sMLcHXx4PG8eoyhC+oto/8JdoLAkChFvlb1t5Zxh3kx6L/6sZj3A4CIlFsBjoB5Nk4Iw0aJmZjw1fjOWWzxD41dE7RL8ezAq/bBtZNR0UkgAGyUAKy84anYamkll1LRbMSUsY9UfWVZmXq5jaNVSB6VVsyFMFhRdNKBWbi0kLCe9c0IJrtXkAmHEIHg6nbrSjgjFpHhPqJIak0Z9U5Pc+/gfsP9tp+y1pAazCztizTwVXvo69H8vXDIxJJ50GVFT/hyqGG/LEgE3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3736 Original-Authentication-Results: embedded-brains.de; dkim=none (message not signed) header.d=none; embedded-brains.de; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT025.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(346002)(136003)(376002)(46966005)(6862004)(26005)(36906005)(478600001)(4744005)(5660300002)(47076004)(316002)(4326008)(186003)(16526019)(2616005)(53546011)(33656002)(956004)(8886007)(2906002)(336012)(86362001)(356005)(7696005)(55016002)(36756003)(8676002)(82740400003)(81166007)(82310400002)(70206006)(1076003)(70586007)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 182e8b3e-b5a1-4f0e-d0f1-08d7fc9b6f05 X-Forefront-PRVS: 04097B7F7F X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x04h+Q9bSIX8X9nbUUCveoQvdYq0F+1PSrMLACt9vOx05fjHK/jShP/6J47PkWJIcb+kPsz00AfPApMxNNBTb/KzthIaoc19ZcDIwV0nRJETiqDpsS+W258/x6d4CeJ5txvdmC3YHA/rL3gNXnqYwPFx2O5Jhgj02PVVq0jpG3Nf1ybYcmS6/QkI46TvQS4KlSdU2/skQWYHdlqrJR3a72iLVd2rmY4mke3pg361Rm4/zVW6Z4qzcwkyvOWPdGGkt21gQ9WiVScZvsNKjQ99zldjzAYm7a5Sf7SrGYeOl7k1ywnwwWGVTKtJGfqRHYa53io9lq/2afbXZSttoPBdcLGqfyO/PcE86Z9yCf89Y7rMKxygfellcbgW2M06LP66uxCmWHsqoVqP6+GYpeh6+36x76iDivzJtW+fI12FyabAbV5/580Dd8QbtCPpUfHjFyQHy7NCEWbGF9MxPpsZXIdWRp/pbGs+3skhtCGrm65tBelbQjt/BdHfH40DkkXJJ4iuTf2XG6q/RMTHmCyT1w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 08:54:47.8095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3fe99aac-94da-49c6-a230-08d7fc9b732d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3629 X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 08:54:51 -0000 The 05/19/2020 19:41, Sebastian Huber wrote: > Hello, > > On 19/05/2020 11:52, Szabolcs Nagy wrote: > > - Failed to set errno on error. > why should aligned_alloc() set errno on error? iso c allows standard api calls to set errno (except not to 0) but usually does not specify error conditions, however posix does and requires allocation functions to set errno to ENOMEM on failure. posix is not yet aligned with c11 so there is no errno specification for aligned_alloc but that does not mean newlib should make it deliberately inconsistent with other allocation functions, users will try to use perror or strerror when calls fail that may internally use aligned_alloc and expect reasonable error message.