From patchwork Thu Oct 26 20:42:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam James X-Patchwork-Id: 158683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp158343vqb; Thu, 26 Oct 2023 13:43:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnYzGwKp8lfz6D8C32Qu27o4hgw28LsV4c6Np9XOVBMBV58Q7Z6lJVZC397Ugcn2aNiY/n X-Received: by 2002:a05:622a:20f:b0:41e:2d5d:cefe with SMTP id b15-20020a05622a020f00b0041e2d5dcefemr902483qtx.33.1698353017012; Thu, 26 Oct 2023 13:43:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698353016; cv=pass; d=google.com; s=arc-20160816; b=SEna4kMQt5OZ337JXzhr+X2TQ5r4BX5cBEuQ6lo4eFjwfptVuo32sdKpnDkeWXx49G inYLZK6l2gCg/hN64cAlY0IDBJS//BHxaCljsjaliOjzWpYwPWokppFTJzuSrLmwHTFd LvfkOLzHQgpyTqnhU/LbK/lAfgtgH58KXZMmMsrXuwhDWCpsToZjXtQGMNZGq5li+K/f Ev1pNySdRG1ot7WXhuWqSN2gb/TWiMwdQyfS7Mpk8kTGpkPdIMrFG3v/MSlwdS0uOeMt Hi6+nqe5b6jusWCm50gSBXs1PY2W70UWh0C0QIYBCKjKImkqdvO+slHm2kMdzZut+9ug dGsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:arc-filter :dmarc-filter:delivered-to; bh=F/U4LPFuAUdHB/aiFy96VVhRTqdk+wc21m3Pvs1OwSI=; fh=9ya/ss8uDv5CYrs8BUDx/HO/WjjdxfKQY+clk3UB1mY=; b=omQRpVRtocUdN5QJjEKaA+XNBK25jflZczgc5dMHkLD6ClWC65lUQzDZZtyxpkV5W8 pU6hc40bEw0hs261evMV0K6grLdWEvoIRhN4cOATDZnv0bfJTQl2/j+Gltce4gKw+Kfh p3ec0sON8w5AKgUotpZ+TLW2sBOzhGXdl+QY8Tb/bncd43CbvG4IlFd9RXLofMMfVyWq 30XGwUKmaE6bRf/3rs5ShzwtD+fSLZw3iZsMFevYcu9umMc9hn2okxpccNcgvg19fCql SSi6h/OFThBvE67GQL3uqxNclVpLJWR74XZibRIHilsKuaWclchHPmUW8JB+v1AUzblD tOwg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f20-20020ac87f14000000b0041804dba740si79417qtk.747.2023.10.26.13.43.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 13:43:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EDC54386D619 for ; Thu, 26 Oct 2023 20:43:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id D88193858D32 for ; Thu, 26 Oct 2023 20:43:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D88193858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D88193858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698352990; cv=none; b=fnzSqUr/P0eBNn0p0GFhRcbZikLzAP4Xgomb/oNiFld/iKp1qnuAH3xOU0CIx1rjoto4bdYkiaF5XF2SZ7xWxEIi68O9QnX7o4cSxSUozhPFgh4PA7dCb+vbPgdAYOoFlKnyJKWlt2abvbfhW6KZK4RkryjRLCq2Rso1t7sI1Eo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698352990; c=relaxed/simple; bh=CMeDmBO3UduVGPuNsgwCj3z8BLJo2bJ4VqxHf6QtrlA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=G08f3jtMzR57EvlwpvpuHy5OLmWeqY6RTVDQSS9nzfjOOUa5sfA1bZVPcPQYPPhjUqxrjsS82RtIxqGiOBgFOZ9TYxiqxPnUdSfu3ZHIRbVAo7vmYBmTdP0nal9svKxZtUsKwA5jKq+JhJn/ApaLPq8XfxjUrP0aeWM6x78lL0s= ARC-Authentication-Results: i=1; server2.sourceware.org From: Sam James To: gcc-patches@gcc.gnu.org Cc: gerald@pfeifer.com, jwakely@redhat.com, Sam James Subject: [PATCH htdocs v3] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG Date: Thu, 26 Oct 2023 21:42:14 +0100 Message-ID: <20231026204248.510365-1-sam@gentoo.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780852213500060472 X-GMAIL-MSGID: 1780852213500060472 These options both enabled more checking within the C++ standard library and can expose errors in submitted code. -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try it, it's not always feasible because it requires the whole program and any used libraries to also be built with it (as it breaks ABI). Signed-off-by: Sam James --- v3: Link to debug mode docs. v2: Improve phrasing for the types of checks and be less scornful about ABI changes. htdocs/bugs/index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html index da3d4c0d..40355911 100644 --- a/htdocs/bugs/index.html +++ b/htdocs/bugs/index.html @@ -56,6 +56,14 @@ makes a difference, or if compiling with -fsanitize=undefined produces any run-time errors, then your code is probably not correct.

+

We also ask that for C++ code, users test their programs with +-D_GLIBCXX_ASSERTIONS. If you're able to rebuild the entire +program (including any libraries it uses, because it changes ABI), please do try +libstdc++'s debug mode +(-D_GLIBCXX_DEBUG) which enables more thorough checking in parts of +the C++ standard library. If either of these fail, this is a strong indicator +of an error in your code.

+

Summarized bug reporting instructions

After this summary, you'll find detailed instructions that explain