Bug#1094299: x86_64-linux-gnu-gcc-ar-14.1: Some remarks and a patch with editorial changes for this man page

2025-01-26 Thread Bjarni Ingi Gislason
Package: gcc-14-x86-64-linux-gnu
Version: 14.2.0-12
Severity: minor
Tags: patch

   * What led up to the situation?

 Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man 
page"

  [Use "groff -e ' $' -e '\\~$' " to find obvious trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

an.tmac::17: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

   * What outcome did you expect instead?

 No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages gcc-14-x86-64-linux-gnu depends on:
ii  binutils-x86-64-linux-gnu  2.43.50.20250108-1
ii  cpp-14-x86-64-linux-gnu14.2.0-12
ii  gcc-14-base14.2.0-12
ii  libc6  2.40-5
ii  libcc1-0   14.2.0-12
ii  libgcc-14-dev  14.2.0-12
ii  libgcc-s1  14.2.0-12
ii  libgmp10   2:6.3.0+dfsg-3
ii  libisl23   0.27-1
ii  libmpc31.3.1-1+b3
ii  libmpfr6   4.2.1-1+b2
ii  libstdc++6 14.2.0-12
ii  libzstd1   1.5.6+dfsg-2
ii  zlib1g 1:1.3.dfsg+really1.3.1-1+b1

Versions of packages gcc-14-x86-64-linux-gnu recommends:
ii  libc6-dev  2.40-5

Versions of packages gcc-14-x86-64-linux-gnu suggests:
ii  gcc-14-doc  14.2.0-1
pn  gcc-14-locales  

-- no debconf information
Input file is x86_64-linux-gnu-gcc-ar-14.1

Output from "mandoc -T lint  x86_64-linux-gnu-gcc-ar-14.1": (shortened list)


-.-.

Output from "test-groff -mandoc -t -ww -z x86_64-linux-gnu-gcc-ar-14.1": 
(shortened list)

  1 Use macro '.B' for one argument or split argument.
  1 .BR is for at least 2 arguments, got 1

-.-.

Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
  " \(em " creates a too big gap in the text (in "troff").

An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".

x86_64-linux-gnu-gcc-ar-14.1:3:gcc-ar \- a wrapper around ar adding the 
--plugin option

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

14:See ar(1) for a list of options that ar understands.
17:.BR ar(1)

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

an.tmac::17: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
--- x86_64-linux-gnu-gcc-ar-14.12025-01-26 11:30:42.958682509 +
+++ x86_64-linux-gnu-gcc-ar-14.1.new2025-01-26 23:30:03.685802698 +
@@ -1,17 +1,21 @@
 .TH GCC-ar-14 1 "May 8, 2012" gcc-ar-14 ""
 .SH NAME
-gcc-ar \- a wrapper around ar adding the --plugin option
+gcc-ar \- a wrapper around ar adding the \-\-plugin option
 
 .SH SYNOPSIS
 gcc-ar [\fB\s-1OPTION\s0\fR] ... [\fI\s-1ARGS\s0\fR...]
 
 .SH DESCRIPTION
 
-\fBgcc-ar\fR is a wrapper around ar(1) adding the appropriate
+\fBgcc-ar\fR is a wrapper around
+.BR ar (1)
+adding the appropriate
 \fB\-\-plugin\fR option for the GCC 14 compiler.
 
 .SH OPTIONS
-See ar(1) for a list of options that ar understands.
+See
+.BR ar (1)
+for a list of options that ar understands.
 
 .SH "SEE ALSO"
-.BR ar(1)
+.BR ar (1)
  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8  

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  Not beginning each input sentence on a new line.
Line length should thus be reduce

Bug#1094300: x86_64-linux-gnu-gcc-nm-14.1: Some remarks and a patch with editorial changes for this man page

2025-01-26 Thread Bjarni Ingi Gislason
Package: gcc-14-x86-64-linux-gnu
Version: 14.2.0-12
Severity: minor
Tags: patch

   * What led up to the situation?

 Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man 
page"

  [Use "groff -e ' $' -e '\\~$' " to find obvious trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

an.tmac::17: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

   * What outcome did you expect instead?

 No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages gcc-14-x86-64-linux-gnu depends on:
ii  binutils-x86-64-linux-gnu  2.43.50.20250108-1
ii  cpp-14-x86-64-linux-gnu14.2.0-12
ii  gcc-14-base14.2.0-12
ii  libc6  2.40-5
ii  libcc1-0   14.2.0-12
ii  libgcc-14-dev  14.2.0-12
ii  libgcc-s1  14.2.0-12
ii  libgmp10   2:6.3.0+dfsg-3
ii  libisl23   0.27-1
ii  libmpc31.3.1-1+b3
ii  libmpfr6   4.2.1-1+b2
ii  libstdc++6 14.2.0-12
ii  libzstd1   1.5.6+dfsg-2
ii  zlib1g 1:1.3.dfsg+really1.3.1-1+b1

Versions of packages gcc-14-x86-64-linux-gnu recommends:
ii  libc6-dev  2.40-5

Versions of packages gcc-14-x86-64-linux-gnu suggests:
ii  gcc-14-doc  14.2.0-1
pn  gcc-14-locales  

-- no debconf information
Input file is x86_64-linux-gnu-gcc-nm-14.1

Output from "mandoc -T lint  x86_64-linux-gnu-gcc-nm-14.1": (shortened list)


-.-.

Output from "test-groff -mandoc -t -ww -z x86_64-linux-gnu-gcc-nm-14.1": 
(shortened list)

  1 Use macro '.B' for one argument or split argument.
  1 .BR is for at least 2 arguments, got 1

-.-.

Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
  " \(em " creates a too big gap in the text (in "troff").

An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".

x86_64-linux-gnu-gcc-nm-14.1:3:gcc-nm \- a wrapper around nm adding the 
--plugin option

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

14:See nm(1) for a list of options that nm understands.
17:.BR nm(1)

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

an.tmac::17: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
--- x86_64-linux-gnu-gcc-nm-14.12025-01-26 23:39:32.997615069 +
+++ x86_64-linux-gnu-gcc-nm-14.1.new2025-01-26 23:43:24.707976365 +
@@ -1,17 +1,21 @@
 .TH GCC-nm-14 1 "May 8, 2012" gcc-nm-14 ""
 .SH NAME
-gcc-nm \- a wrapper around nm adding the --plugin option
+gcc-nm \- a wrapper around nm adding the \-\-plugin option
 
 .SH SYNOPSIS
 gcc-nm [\fB\s-1OPTION\s0\fR] ... [\fI\s-1ARGS\s0\fR...]
 
 .SH DESCRIPTION
 
-\fBgcc-nm\fR is a wrapper around nm(1) adding the appropriate
+\fBgcc-nm\fR is a wrapper around
+.BR nm (1)
+adding the appropriate
 \fB\-\-plugin\fR option for the GCC 14 compiler.
 
 .SH OPTIONS
-See nm(1) for a list of options that nm understands.
+See
+.BR nm (1)
+for a list of options that nm understands.
 
 .SH "SEE ALSO"
-.BR nm(1)
+.BR nm (1)
  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8  

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  Not beginning each input sentence on a new line.
Line length should thus be reduce

Bug#1094302: x86_64-linux-gnu-gcc-ranlib-14.1: Some remarks and a patch with editorial changes for this man page

2025-01-26 Thread Bjarni Ingi Gislason
Package: gcc-14-x86-64-linux-gnu
Version: 14.2.0-12
Severity: minor
Tags: patch

   * What led up to the situation?

 Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man 
page"

  [Use "groff -e ' $' -e '\\~$' " to find obvious trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

an.tmac::17: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

   * What outcome did you expect instead?

 No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages gcc-14-x86-64-linux-gnu depends on:
ii  binutils-x86-64-linux-gnu  2.43.50.20250108-1
ii  cpp-14-x86-64-linux-gnu14.2.0-12
ii  gcc-14-base14.2.0-12
ii  libc6  2.40-5
ii  libcc1-0   14.2.0-12
ii  libgcc-14-dev  14.2.0-12
ii  libgcc-s1  14.2.0-12
ii  libgmp10   2:6.3.0+dfsg-3
ii  libisl23   0.27-1
ii  libmpc31.3.1-1+b3
ii  libmpfr6   4.2.1-1+b2
ii  libstdc++6 14.2.0-12
ii  libzstd1   1.5.6+dfsg-2
ii  zlib1g 1:1.3.dfsg+really1.3.1-1+b1

Versions of packages gcc-14-x86-64-linux-gnu recommends:
ii  libc6-dev  2.40-5

Versions of packages gcc-14-x86-64-linux-gnu suggests:
ii  gcc-14-doc  14.2.0-1
pn  gcc-14-locales  

-- no debconf information
Input file is x86_64-linux-gnu-gcc-ranlib-14.1

Output from "mandoc -T lint  x86_64-linux-gnu-gcc-ranlib-14.1": (shortened list)


-.-.

Output from "test-groff -mandoc -t -ww -z x86_64-linux-gnu-gcc-ranlib-14.1": 
(shortened list)

  1 Use macro '.B' for one argument or split argument.
  1 .BR is for at least 2 arguments, got 1

-.-.

Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
  " \(em " creates a too big gap in the text (in "troff").

An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".

x86_64-linux-gnu-gcc-ranlib-14.1:3:gcc-ranlib \- a wrapper around ranlib adding 
the --plugin option

-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

10:\fBgcc-ranlib\fR is a wrapper around ranlib(1) adding the appropriate
14:See ranlib(1) for a list of options that ranlib understands.
17:.BR ranlib(1)

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

an.tmac::17: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
--- x86_64-linux-gnu-gcc-ranlib-14.12025-01-26 23:50:07.547671972 +
+++ x86_64-linux-gnu-gcc-ranlib-14.1.new2025-01-26 23:53:38.517578881 
+
@@ -1,17 +1,21 @@
 .TH GCC-ranlib-14 1 "May 8, 2012" gcc-ranlib-14 ""
 .SH NAME
-gcc-ranlib \- a wrapper around ranlib adding the --plugin option
+gcc-ranlib \- a wrapper around ranlib adding the \-\-plugin option
 
 .SH SYNOPSIS
 gcc-ranlib [\fB\s-1OPTION\s0\fR] ... [\fI\s-1ARGS\s0\fR...]
 
 .SH DESCRIPTION
 
-\fBgcc-ranlib\fR is a wrapper around ranlib(1) adding the appropriate
+\fBgcc-ranlib\fR is a wrapper around
+.BR ranlib (1)
+adding the appropriate
 \fB\-\-plugin\fR option for the GCC 14 compiler.
 
 .SH OPTIONS
-See ranlib(1) for a list of options that ranlib understands.
+See
+.BR ranlib (1)
+for a list of options that ranlib understands.
 
 .SH "SEE ALSO"
-.BR ranlib(1)
+.BR ranlib (1)
  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8  

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Not re

Bug#1094270: std::filesystem::weakly_canonical throws if the file disappears during its execution

2025-01-26 Thread Enrico Zini
Package: libstdc++-14-dev
Version: 14.2.0-12
Severity: normal

Hello,

thank you for maintaining libstdc++.

The function std::filesystem::weakly_canonical is defined as working
even if the path points to a file that does not exist.

If however the path disappears while weakly_canonical does its thing, we
surprisingly get an exception.

I'm attaching a reproducer:

$ g++ weakly_canonical.cc -o weakly_canonical
$ ./weakly_canonical
Canonicalized path for missing file: "…/tmp/does-not-exist"
weakly_canonical failed at iteration 36: filesystem error: cannot make 
canonical path: No such file or directory [tmp/test]

Enrico

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.6-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libstdc++-14-dev depends on:
ii  gcc-14-base14.2.0-12
ii  libc6-dev  2.40-5
ii  libgcc-14-dev  14.2.0-12
ii  libstdc++6 14.2.0-12

libstdc++-14-dev recommends no packages.

Versions of packages libstdc++-14-dev suggests:
pn  libstdc++-14-doc  

-- no debconf information
#include 
#include 
#include 

std::filesystem::path workdir("tmp");
auto oddpath = workdir / "test";
bool done = false;

void glitch()
{
while (! done)
{
std::filesystem::remove(oddpath);
std::filesystem::create_directory(oddpath);
}
}

void canonical()
{
unsigned iteration = 0;
try {
while (true)
{
++iteration;
(void)std::filesystem::weakly_canonical(oddpath);
}
} catch (std::exception& e) {
done = true;
std::cerr << "weakly_canonical failed at iteration " << iteration << ": 
" << e.what() << std::endl;
}
}


int main(int argc, const char* argv[])
{
std::filesystem::create_directory(workdir);
auto missing = std::filesystem::weakly_canonical(workdir / 
"does-not-exist");
std::cerr << "Canonicalized path for missing file: " << missing << 
std::endl;

std::thread glitcher(glitch);

canonical();

glitcher.join();

std::filesystem::remove_all(workdir);

return 0;
}