From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 9D5A41F4B4 for ; Thu, 31 Dec 2020 21:26:20 +0000 (UTC) Received: from localhost ([::1]:56702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv5Sd-0003B4-R4 for normalperson@yhbt.net; Thu, 31 Dec 2020 16:26:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv5SV-0003AT-LI for bug-gnulib@gnu.org; Thu, 31 Dec 2020 16:26:11 -0500 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]:42856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kv5SU-0002X9-57 for bug-gnulib@gnu.org; Thu, 31 Dec 2020 16:26:11 -0500 Received: by mail-il1-x133.google.com with SMTP id 2so18245120ilg.9 for ; Thu, 31 Dec 2020 13:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=esURnVlPceuGHa8R2Sy6ObS7j4cIykNw4rXeLGY8lc4=; b=lnYiWDCegKnifUJKos/j3F5wP6okQSPtARDYUwYIc648nToJpOH8XGBHUrn+WaZZ+H ypxij460XrlNvLZAfEJudn0AIB253c/fKFnFBfw5Oe6e9Lr6k9n9K9dAOk+LMgcw2DK6 5ECe/o2blCl6rnws2lFqdw/+ExNAg/Goj2OYMI74JvuqvsSxagxAJBsOzlM6dv5StzKx 9AQLD4zVLgljms5FoolngBieFhUqQJHd64q4cfGHrUUeUlOQJIb0/7cYzeQZsho7hu1a P2dHSw96lf36JUUSQgiwMvnLjdxQdnLkNWdDhDPw2MHQOlw48/yi8It6Y+hXRhR4qEKE EWcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=esURnVlPceuGHa8R2Sy6ObS7j4cIykNw4rXeLGY8lc4=; b=b8Reaim6KIHMjNdraD9hgCFzVfVuResSe5OjE0LN67CvsrjLWjMafSVmf2SI1Hn5Al B+7OxugNRVdADWJBkcF/cMXziGe+u/mwUFu7ABhRINEWce7zCVTeo7qN/jfevv1W9iY3 KZ/7n9RpDtvtSzueR94vwQkU3LTvmHexgZAd/4Of5PlKU7AUNcqPmN8TKPqrqypj/78U xi9RZpdAJVk7FeMuYu63Us9prdKgzOR8qFfH6AQJBgxSDhTlPM9AwnD4zb32cfnbb1+H 8+xv+ZSpC35igTJ77a1q/1Ku03eZnYgRqg2nxllLh9qwDh4SltQCYuszluPUgU8holuG UJrw== X-Gm-Message-State: AOAM532jAvk4F31bdhxPaZWI37AyayLyplv+vmZx0+ls75BttkwYl8mq E+5dNYVNkex3HBSPRi6eGLsnRJc3c7nlqKOby4s5dCsZ X-Google-Smtp-Source: ABdhPJx/nj1yG3nCeWiHhRhzMHUv59Lmvpa/LG3NPXCZaWUmRdqLf1TngBVmQ7Mb/nyLiaWPsybApLUst80UEz9A9U8= X-Received: by 2002:a92:9881:: with SMTP id a1mr58735013ill.238.1609449968796; Thu, 31 Dec 2020 13:26:08 -0800 (PST) MIME-Version: 1.0 References: <178830743.E17llfbRSe@omega> In-Reply-To: <178830743.E17llfbRSe@omega> From: Jeffrey Walton Date: Thu, 31 Dec 2020 16:25:50 -0500 Message-ID: Subject: Re: memalign: Work around Solaris bug To: Bruno Haible Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::133; envelope-from=noloader@gmail.com; helo=mail-il1-x133.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: noloader@gmail.com Cc: "bug-gnulib@gnu.org List" Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On Thu, Dec 31, 2020 at 4:21 PM Bruno Haible wrote: > > On Solaris 11.4, Solaris OpenIndiana, Solaris OmniOS, I see this test failure: > > ../../gltests/test-memalign.c:51: assertion 'aligned2_blocks[i] != NULL' failed > FAIL test-memalign (exit status: 262) > > Apparently memalign() does not support alignments 1 and 2 on this platform. > > This patch fixes it, by using malloc() in these cases. (Bumping the alignment > to 4 in these cases would be an alternative workaround.) AIX may be the same. Heap memory is aligned to 4 by default, not 16. I don't know what happens with, say, posix_memalign. I don't think I've ever asked for an alignment of 1 or 2 when using it on AIX. Jeff