From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id BD1313858D20 for ; Wed, 5 Apr 2023 17:03:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD1313858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x433.google.com with SMTP id y14so36930246wrq.4 for ; Wed, 05 Apr 2023 10:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680714194; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lz1uL/2zsVqQWEAejzBqWUMJJC6IZfK05sDXt4O6ax4=; b=XqH7kOaQMtH4rTC6zsgfbDwIHjjyB4hSodbbukpNDV95xHxMh7lo2vASe+1apYuZmr n5ni1kfdHCXoBUXFGpB1owv1bXFR1HNGqBNXWlIZgqN5v9g2QGz0aSx2qWUBIXQaBCvz L0yoqXWTYd2Dwi4CnZkWj9AFWRonl98Fynlr0wslbL7I1igJH7vJPtACrnAagpraYbsU foYrC4vhYuQtk0IBSfiaFbokTyf4yUWT/yRV/kfMxaeIEtCn4A6F+9EyUgTCealPM9Fs Z7JhEK+zJKpTbFP/j5F/Li6UVln26npG2sQiifJM7RzFtj7wNIjof8rTP4ahoXHiM2YF U70Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680714194; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lz1uL/2zsVqQWEAejzBqWUMJJC6IZfK05sDXt4O6ax4=; b=OaAUjv+gidii12C92hamDba9YDCII5Pc+9cvaNPDhPB1RikSNwUxSB9G+iXugwlib2 6g0K5VyUYHWGHyBLJ1oznfdc65lc/enk5s80MFmjShGNrjzTvFyIxhGr5y8No9+oGPAT /6FZ/uv9rittn++nuAdZ6Ar2e4MPtG0QF2uHMjPRLOtRsGE5G/Ad5xGVJ+8DqKp+NMFy IycV3M+wNnqYNB3cwT1sOOKcEWSWO2UjodBoZzZnmmteXK849370KJ8RmaVlci2SsThm UpY2ObENHY/5ANlVvfKvFuriGlkVBd9IREUZlm2m2CTp4lxZmvt0811qjdnKYX2KvzG9 x1iw== X-Gm-Message-State: AAQBX9dzfBENOy5+gHuOP0n5JmMYGEUVUJV532Xhte5MRwzny+5oNvqt XzfX7pvX0veD86ZV40Tu/v5Uhd1HdP8= X-Google-Smtp-Source: AKy350ZxcpfsDsgr88RsEeZvo4y57HVJaGhWpU80IymHl1bmIX3N24k6rk1jYuyCN7s1lBc+7m3yFA== X-Received: by 2002:a5d:400a:0:b0:2d8:97c7:713d with SMTP id n10-20020a5d400a000000b002d897c7713dmr4199074wrp.38.1680714194336; Wed, 05 Apr 2023 10:03:14 -0700 (PDT) Received: from [10.25.2.79] ([109.190.253.11]) by smtp.gmail.com with ESMTPSA id n18-20020a5d4852000000b002c561805a4csm15467828wrs.45.2023.04.05.10.03.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 10:03:13 -0700 (PDT) Message-ID: Date: Wed, 5 Apr 2023 19:03:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: PR 108846 regression To: Jonathan Wakely Cc: libstdc++ References: Content-Language: en-US From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 03/04/2023 22:06, Jonathan Wakely wrote: > On Mon, 3 Apr 2023 at 21:00, François Dumont via Libstdc++ > wrote: >> After a full rebuild and run of testsuite based on master I have this >> regression: >> >> FAIL: 23_containers/vector/bool/allocator/copy.cc (test for excess errors) >> Excess errors: >> /home/fdumont/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:437: >> warning: 'void* __builtin_memmove(void*, const void*, long unsigned >> int)' writing between 9 and 9223372036854775807 bytes into a region of >> size 8 overflows the destination [-Wstringop-overflow=] >> >> It comes from the change related to PR 108846, revision >> 822a11a1e642e0abe92a996e7033a5066905a447 >> >> The compiler seems to have enough info to find out that destination >> memory area is 8 bytes large but not enough to see that _Num is 1 and so >> never going to call the __builtin_memmove. Maybe a compiler bug. > Yes, it's a compiler bug: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109353 > >> I'm working on a patch to restore previous code when src and dst pointer >> types are the same. > How will that avoid the PR 108846 problem of overwriting tail padding? Indeed, test cases have shown me that copy was called with pointers on the same type. No way to find out that the fix is not necessary in this case. We just need to wait for the compiler to be fixed then. Bests