From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id A315B385800A for ; Fri, 10 Nov 2023 10:19:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A315B385800A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A315B385800A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699611550; cv=none; b=iV5nPKCXSJA/WtXBW3f6JSstx9S5un2a3A0UsUkg4tX+GjvySHb5Vgip8is9d6KQ2+rnHASxqIq882jPy9IbXqir+UrZ/xUC8QzuqqQVSFhrTCKWPnQRpsd6ZKnFxp96IiMStaFa6s1ENbG/zfjzpGuuWw3nF7NFY2aAuiTsY2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699611550; c=relaxed/simple; bh=KhONn6etCc/0N+IYglHMq1aSySJv2GlMMtE8dpm77bw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=eox1lIYmZrRKJ77jQGyhBO6mhr+rbX/gWoy7P+k1vRDjK3Y9SYaHvTmPxXg1Of4mRBFEgk10OT4IrBl8NgzcMtAfEWjMtaNUtJAFlK98+SWmr+VTIKUraeR+3B92JUScO+zjRbh80WNA4y67KxAuUs1Q+gj9fIb/xbmw5XaSiNY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso1691494b3a.2 for ; Fri, 10 Nov 2023 02:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699611543; x=1700216343; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9TIeOUDdZWexr7V+4ghxot2rguS1EpKFfGaJl96bWcc=; b=MDLz8yTQWHv70/Xp2TSCih6CjP0Pd2E7mDnTX/lcTflOB5PmKE/kXOCdhsERH+bEvZ MzWdbKH0r5w4HDHc3rRymdsm/MzmLpQICC1a5NNRWG35Xao9Wsoj7Y5sKJ1wDlgIQowK MK4wsPwPbApLr9pZmH63yYIGFoF0CQsQf1sxFOfXuJHh00LeEav1yDbIuAi1tAQ760Mb 4tdHV8mg0dJzWhWucaPtuwoqxT5SCx0+i5E+6j5qCb687E1gnSnwdshtTdQKY7+SoMtz FS0cLvQXIKhPfBFLjDh+gfsfn1i7VSJs/jrAzdzueRzLQRHYHctLWblPyUC8z++CGQHr /X/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699611543; x=1700216343; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9TIeOUDdZWexr7V+4ghxot2rguS1EpKFfGaJl96bWcc=; b=ACmvG2RyUSMGWb9U5Oca2//WKTOmgWU1AIRTLiqgdG8TaZkKK7rYOdAzDC3gh9cy7P XRh3eQxD7bpQ18+KmSxenTj+mjrBNH3j2uCmpqfdZmg6UO/qkXANAyOyb1agie+/qTa/ qJR4aosUTTnpGW1L5d7kpMjf9Bkraxgd2ePCLAX0DYX4a9nL2vA+zLlYtqZdN4zz9bus XxouVMpRCAyegXadlzJYqzUkxK/DsI9LiPixUHN4qm+wb5OjUKY8E6hK2WmcDF/hw65Y LDrh2tOcVdudPZtvG/tpjG8p4MsjNClYPIL3rhGcUdy6VqxilaS7APC/Z2UPDRqq8Nqn SG0A== X-Gm-Message-State: AOJu0YxxTTBzpAlb81Zy1gCDVFPWKyc2wJBsg0wN7j473U6HgMUC77AQ LxGpCGFdWuFu4qBQ6vHt41MmBbm+FSUrWptsbQXdBQ== X-Google-Smtp-Source: AGHT+IG1o/0LPGPDt/DL0l7ZGf5l8GPoXgiAvZvR+49dp+R3XGZAzWyi1+eydW+d1SwLD2jxew7qX2F3FNlcau4ySUk= X-Received: by 2002:a05:6a21:66c7:b0:182:6ba:3f9b with SMTP id ze7-20020a056a2166c700b0018206ba3f9bmr8311246pzb.56.1699611543504; Fri, 10 Nov 2023 02:19:03 -0800 (PST) MIME-Version: 1.0 References: <20231108214813.1569-1-takashi.yano@nifty.ne.jp> <20231109192624.8fd1d42b4123b444b095f81f@nifty.ne.jp> <20231110003602.909efa12752d9365403db70a@nifty.ne.jp> In-Reply-To: <20231110003602.909efa12752d9365403db70a@nifty.ne.jp> From: Christophe Lyon Date: Fri, 10 Nov 2023 11:18:57 +0100 Message-ID: Subject: Re: [PATCH v5] newlib: libc: Fix crash on fprintf to a wide-oriented stream. To: Takashi Yano Cc: newlib@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: Hi! On Thu, 9 Nov 2023 at 16:36, Takashi Yano wrote: > > On Thu, 9 Nov 2023 13:49:41 +0100 > Corinna Vinschen wrote: > > On Nov 9 19:26, Takashi Yano wrote: > > > On Thu, 9 Nov 2023 11:08:03 +0100 > > > Corinna Vinschen wrote: > > > > Looks good, please push. > > > > > > Thanks. Should this also be applied to cygwin-3_4-branch? > > > > Tricky question. It's a bugfix, yeah, but a bugfix for an undefined > > situation. And it's also a behavioral change. So, from my POV we > > shouldn't backport it. > > I see. I'll push it only for master branch. > > > But if you have another POV, we can discuss it. It occured to me that > > you didn't mention where the testcase is coming from. Was that a > > real-world problem? If so, where and in which circumstances? > > No. It was discovered by an accidental mistake while writing > a test case for another problem. > After this patch, our automated CI has detected regressions on arm-none-eabi with GCC configured with: --disable-multilib --with-mode=thumb --with-cpu=cortex-m33 --with-float=hard (all these options are probably not mandatory, we have other configurations pending in the build queue) The regressions appear in the libstdc++ tests: Running libstdc++:libstdc++-dg/conformance.exp ... FAIL: 27_io/objects/wchar_t/12048-1.cc -std=gnu++17 execution test FAIL: 27_io/objects/wchar_t/12048-2.cc -std=gnu++17 execution test FAIL: 27_io/objects/wchar_t/12048-3.cc -std=gnu++17 execution test FAIL: 27_io/objects/wchar_t/12048-4.cc -std=gnu++17 execution test XPASS: 27_io/objects/wchar_t/12048-5.cc -std=gnu++17 execution test FAIL: ext/stdio_sync_filebuf/wchar_t/1.cc -std=gnu++17 execution test FAIL: ext/stdio_sync_filebuf/wchar_t/12948-1.cc -std=gnu++17 execution test FAIL: ext/stdio_sync_filebuf/wchar_t/12948-2.cc -std=gnu++17 execution test FAIL: ext/stdio_sync_filebuf/wchar_t/12948-3.cc -std=gnu++17 execution test FAIL: ext/stdio_sync_filebuf/wchar_t/12948-4.cc -std=gnu++17 execution test the logs show: /libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-1.cc:37: void test01(): Assertion 'std::wcin.good()' failed. FAIL: 27_io/objects/wchar_t/12048-1.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-2.cc:34: void test01(): Assertion 'std::wcin.good()' failed. FAIL: 27_io/objects/wchar_t/12048-2.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-3.cc:34: void test01(): Assertion 'std::wcin.rdbuf()->sgetn(buf, 2) == 2' failed. FAIL: 27_io/objects/wchar_t/12048-3.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-4.cc:31: void test01(): Assertion 'std::wcin.rdbuf()->sgetn(buf, 2) == 2' failed. FAIL: 27_io/objects/wchar_t/12048-4.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc:43: void test01(): Assertion 'traits_type::to_char_type(wsbuf.sgetc()) == w_lit[0]' failed. FAIL: ext/stdio_sync_filebuf/wchar_t/1.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc:31: void test02(): Assertion 'c1 != WEOF' failed. FAIL: ext/stdio_sync_filebuf/wchar_t/12948-1.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc:31: void test03(): Assertion 'c1 != WEOF' failed. FAIL: ext/stdio_sync_filebuf/wchar_t/12948-2.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc:31: void test04(): Assertion 'sbuf.sgetn(buf, 2) == 2' failed. FAIL: ext/stdio_sync_filebuf/wchar_t/12948-3.cc -std=gnu++17 execution test /libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc:31: void test05(): Assertion 'sbuf.sgetn(buf, 2) == 2' failed. FAIL: ext/stdio_sync_filebuf/wchar_t/12948-4.cc -std=gnu++17 execution test I haven't dug further yet, does that ring a bell? Thanks, Christophe > -- > Takashi Yano