[htdocs,v2] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

Message ID 20231026191628.196706-1-sam@gentoo.org
State Unresolved
Headers
Series [htdocs,v2] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Sam James Oct. 26, 2023, 7:16 p.m. UTC
  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 <sam@gentoo.org>
---
v2: Improve phrasing for the types of checks and be less scornful about ABI changes.

 htdocs/bugs/index.html | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Andrew Pinski Oct. 26, 2023, 7:31 p.m. UTC | #1
On Thu, Oct 26, 2023 at 12:18 PM Sam James <sam@gentoo.org> wrote:
>
> 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).

One suggestion to this is also link to the libstdc++ manual on debug mode:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html

Thanks,
Andrew

>
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> v2: Improve phrasing for the types of checks and be less scornful about ABI changes.
>
>  htdocs/bugs/index.html | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html
> index da3d4c0d..162d846a 100644
> --- a/htdocs/bugs/index.html
> +++ b/htdocs/bugs/index.html
> @@ -56,6 +56,13 @@ makes a difference, or if compiling with <code>-fsanitize=undefined</code>
>  produces any run-time errors, then your code is probably not correct.
>  </p>
>
> +<p>We also ask that for C++ code, users test their programs with
> +<code>-D_GLIBCXX_ASSERTIONS</code>. If you're able to rebuild the entire
> +program (including any libraries it uses, because it changes ABI), please do try
> +<code>-D_GLIBCXX_DEBUG</code> 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.</p>
> +
>  <h2>Summarized bug reporting instructions</h2>
>
>  <p>After this summary, you'll find detailed instructions that explain
> --
> 2.42.0
>
  

Patch

diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html
index da3d4c0d..162d846a 100644
--- a/htdocs/bugs/index.html
+++ b/htdocs/bugs/index.html
@@ -56,6 +56,13 @@  makes a difference, or if compiling with <code>-fsanitize=undefined</code>
 produces any run-time errors, then your code is probably not correct.
 </p>
 
+<p>We also ask that for C++ code, users test their programs with
+<code>-D_GLIBCXX_ASSERTIONS</code>. If you're able to rebuild the entire
+program (including any libraries it uses, because it changes ABI), please do try
+<code>-D_GLIBCXX_DEBUG</code> 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.</p>
+
 <h2>Summarized bug reporting instructions</h2>
 
 <p>After this summary, you'll find detailed instructions that explain