From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id A74EB3858001; Thu, 25 Mar 2021 17:45:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A74EB3858001 Received: by mail-wm1-x32e.google.com with SMTP id k128so1643132wmk.4; Thu, 25 Mar 2021 10:45:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=xkHJg55ES7oJ3ryOzo3rFA1bXpUy6y1Eetzlb90aedI=; b=Oz4LKSvy0Rkhf9VITtZ7hbLBpA2YS3CkX/BHeuRpY6Cx/CwcKE3FnW+xJNxFXW11Ik Bi5QLTMpsn/Mj/coZoyMIFDgzY0ak90Lx01EqZkovGSoeG8/t7TSOnnahM2tDCJnGhdE 64zgIfOak9Y6Qt3wlBWmEigwiMywp1cf+qcmvtieVLjKYxpNmsBodeoSsigms/vOdOVm yC94wyJwp2zlAxu5rPWi8qQq09cbUEJSIgE13bYpybLvTvmMeZGcYeZD7lSlrtrbahIS n9bfq02eQlCrZOpYentzWdlgk6pom+imUZ6/b59Sg4oOePYAKnKuV/tWsj0051BLyuN3 oLiQ== X-Gm-Message-State: AOAM531TuWib5BfTB8jowfDLYAtXuoecuhJPk009bayeJjEDSq/yZWZw xleCMkCTMwTBzrEV6xQBkb0VPm0/bfnr1A== X-Google-Smtp-Source: ABdhPJylm+kQl0M2ylfYMlkntHbJ00L1JXl7tsQfj3hqKJQbxhXj+7FKQCVeJHLcLWPyNLRarFKETA== X-Received: by 2002:a7b:c2fa:: with SMTP id e26mr9016555wmk.102.1616694326564; Thu, 25 Mar 2021 10:45:26 -0700 (PDT) Received: from ?IPv6:2a01:e0a:1dc:b1c0:2c7a:770b:6a8b:7b1b? ([2a01:e0a:1dc:b1c0:2c7a:770b:6a8b:7b1b]) by smtp.googlemail.com with ESMTPSA id z1sm8316276wru.95.2021.03.25.10.45.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 10:45:26 -0700 (PDT) Subject: Re: [PATCH] Complete __gnu_debug::basic_string To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: <53722923-e31e-4311-27cb-c66d60b52b19@gmail.com> <20210319194115.GU3008@redhat.com> <648191d4-da3b-9e94-67a4-8121a2da489f@gmail.com> <20210323154236.GX3008@redhat.com> <20210325130507.GQ3008@redhat.com> <20210325144808.GR3008@redhat.com> <20210325152952.GS3008@redhat.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: Date: Thu, 25 Mar 2021 18:45:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210325152952.GS3008@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2021 17:45:29 -0000 On 25/03/21 4:29 pm, Jonathan Wakely wrote: > On 25/03/21 14:48 +0000, Jonathan Wakely wrote: >> On 25/03/21 13:05 +0000, Jonathan Wakely wrote: >>> On 24/03/21 22:48 +0100, François Dumont wrote: >>>> I still need to find out why, when running test on >>>> __gnu_debug::basic_string after the std::basic_string one, the >>>> generate(sz) call always returns sz. >>> >>> The "random" generator will always return the same sequence of numbers >>> every time you run the test. It uses a default-constructed >>> std::mt19937 without a seed, so the sequence of random numbers is 100% >>> reproducable. >> >> This patch allows those random engines to be seeded, so that we can test >> with different random numbers. >> >> It's already found a bug: >> >> GLIBCXX_SEED_TEST_RNG=-941908610 make check >> RUNTESTFLAGS=conformance.exp=23_containers/forward_list/requirements/exception/generation_prohibited.cc >> >> Using random seed 3353058686 >> FAIL: >> 23_containers/forward_list/requirements/exception/generation_prohibited.cc >> execution test >> >> We need to investigate that. > > Oh, it's the same generate(sz) bug as you already found. But I've > found other bugs, e.g. with GLIBCXX_SEED_TEST_RNG=1908970375). > > I think we should also add a check for non-empty containers to those > test functions, and ensure we don't try to erase from empty > containers (see attached). > > Yes, I also realized this empty container potential issue. Please go ahead with any of your patches, I'll just adapt if you push first. I will commit in a couple of hours. François