From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id 008D43858CDB for ; Sun, 4 Feb 2024 19:34:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 008D43858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 008D43858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.174.156.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707075271; cv=none; b=rlJKKNNfM3GZ9mPl0XKNsuKctwl99bLW1JDNlE6EHw6/jXIaGCEV1XHt7dt7rCNU3kw0c7KFWnDNJNWVE67N8+75rHlY0TFlZxkEBiaTOMuCOYs7tXN/Cb4GSDLhBvA/NDDhRn7/Y7kBsHH4GKLqIWLKKS/dGDaZeVGuZ8lsS74= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707075271; c=relaxed/simple; bh=qFWA3adhech7tnCoEt0GiSMfFl6E141kHY0olclUUeo=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=x5TzpOPidCE5Grj7ybQtxBfhoSf8wHC48ru2j6rkCWBtu+YsTu+CEo4AxrU2XLh864WKldgID9wNfJ7U9tM/zWWrrEdaNdyX77air6MXfYJ3s01QTPZ7GktIQdLazawrps98YLKlyI882mxGD0rgzNbjSqAEDBsYO+BYLzLgB20= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CyW8YHV8NmfLkXKAccy5TQ+3rqmILB0xHvWN2h/7Lps=; b=yVzahCDPDbrweH0xh9YgrOdhOA t3B1aI/fBziRBpGAaWSmPVThdOf7Wqz9kyLCvnPS1/TkqPWD/hWu/CQjRX+E62PUJOdi8D4r6EJ7h 1OCXmoiyaIkV+70CMewHxx3IL+Mew+msdQwPpOq7ZA8qxCAFfM+u9MgH9fdEbzdjV7WbyfE/AtyCo DAW+8Yu1WJJHmcdgFajQJJgxcl+0zLppLQ8OO0GtfxmO3iesbHgXG/EV2KAOJLN5vPtc7oFx9Lhuo QZzE5YHK/RUlfDaqWS9NdLFI5gnefkCmzltgmTHpPcC/TS/uHVyzZ9EBq7DvHEniKkrhtJ4RB0Z3V jaKpwxkA==; Received: from 95-42-20-142.ip.btc-net.bg ([95.42.20.142]:48598 helo=localhost) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rWiFz-0004X3-1U; Sun, 04 Feb 2024 21:34:25 +0200 Date: Sun, 4 Feb 2024 21:34:22 +0200 From: Dimitar Dimitrov To: Corinna Vinschen Cc: Jeff Law , newlib@sourceware.org Subject: Re: Problem with recent change to getlocalename_l Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Thu, Feb 01, 2024 at 08:44:32PM +0100, Corinna Vinschen wrote: > On Feb 1 20:11, Corinna Vinschen wrote: > > No, wait. > > > > On Feb 1 20:00, Corinna Vinschen wrote: > > > Given that this new functionality needs a 32 byte buffer, and given that > > > _REENT_SMALL targets are... well... small, I made the new buffer > > > optional via `#ifdef _MB_CAPABLE' in struct _misc_reent, which only used > > > by _REENT_SMALL targets. > > > > > > Apparently I missed to take the _REENT_CHECK_MISC expression into account. > > > AFAICS the culprit is the _REENT_INIT_MISC macro now. > > > > > > Can you please check if this change fixes the problem? > > > > Try this one instead, please: > > Sorry, I suddenly realized that I screwed up the name of the new member > as well. Sigh. > > Please try this one, it's also much simpler: > > diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h > index 4e60c3096ae2..0cba1667cc66 100644 > --- a/newlib/libc/include/sys/reent.h > +++ b/newlib/libc/include/sys/reent.h > @@ -514,6 +514,11 @@ struct _reent > #define _REENT_CHECK_EMERGENCY(var) \ > _REENT_CHECK(var, _emergency, char *, _REENT_EMERGENCY_SIZE, /* nothing */) > > +#ifdef _MB_CAPABLE > +#define __REENT_INIT_MISC_GETLOCALENAME_L _r->_misc->_getlocalename_l_buf[0] = '\0' > +#else > +#define __REENT_INIT_MISC_GETLOCALENAME_L > +#endif > #define _REENT_INIT_MISC(var) do { \ > struct _reent *_r = (var); \ > _r->_misc->_strtok_last = _NULL; \ > @@ -533,7 +538,7 @@ struct _reent > _r->_misc->_wcrtomb_state.__value.__wch = 0; \ > _r->_misc->_wcsrtombs_state.__count = 0; \ > _r->_misc->_wcsrtombs_state.__value.__wch = 0; \ > - _r->_misc->_getlocale_l_buf[0] = '\0'; \ > + __REENT_INIT_MISC_GETLOCALENAME_L; \ > _r->_misc->_l64a_buf[0] = '\0'; \ > _r->_misc->_getdate_err = 0; \ > } while (0) > Hi, This fixes the build for pru-unknown-elf, and there are no regressions when running the GCC and newlib testsuites. Regards, Dimitar > > Sorry, > Corinna >