public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin.
@ 2024-02-16 10:53 iains at gcc dot gnu.org
2024-02-16 10:54 ` [Bug c++/113957] " iains at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-16 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113957
Bug ID: 113957
Summary: [14 Regression] bad-mapper-1.C hangs on all Darwin.
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c++
Assignee: iains at gcc dot gnu.org
Reporter: iains at gcc dot gnu.org
Target Milestone: ---
Target: *-*-darwin*
Initial analysis: this seems to be hanging in a read in libcody.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/113957] [14 Regression] bad-mapper-1.C hangs on all Darwin.
2024-02-16 10:53 [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin iains at gcc dot gnu.org
@ 2024-02-16 10:54 ` iains at gcc dot gnu.org
2024-02-16 14:24 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-16 10:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113957
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2024-02-16
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/113957] [14 Regression] bad-mapper-1.C hangs on all Darwin.
2024-02-16 10:53 [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin iains at gcc dot gnu.org
2024-02-16 10:54 ` [Bug c++/113957] " iains at gcc dot gnu.org
@ 2024-02-16 14:24 ` iains at gcc dot gnu.org
2024-02-16 14:57 ` [Bug other/113957] " iains at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-16 14:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113957
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
the problem is that liberty is using the value set by posix_spawnp for pid.
but:
(darwin):
The argument pid is a pointer to a pid_t variable to receive the pid of
the spawned process; if this is NULL, then the pid of the spawned process is
not returned. If this pointer is non-NULL, then on
successful completion, the variable will be modified to contain the pid of
the spawned process. The value is undefined in the case of a failure.
(linux):
Upon successful completion, posix_spawn() and posix_spawnp() place the PID of
the child process in pid, and return 0. If there is an error during the fork()
step, then no child is created, the contents of *pid are
unspecified, and these functions return an error number as described
below.
So .. I think the fix will be to set pid = -1 in the error paths .. will try
that.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/113957] [14 Regression] bad-mapper-1.C hangs on all Darwin.
2024-02-16 10:53 [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin iains at gcc dot gnu.org
2024-02-16 10:54 ` [Bug c++/113957] " iains at gcc dot gnu.org
2024-02-16 14:24 ` iains at gcc dot gnu.org
@ 2024-02-16 14:57 ` iains at gcc dot gnu.org
2024-02-19 20:14 ` cvs-commit at gcc dot gnu.org
2024-02-19 20:19 ` iains at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-16 14:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113957
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |other
Keywords|wrong-code |error-recovery
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2024-Februar
| |y/645814.html
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
patch posted.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/113957] [14 Regression] bad-mapper-1.C hangs on all Darwin.
2024-02-16 10:53 [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin iains at gcc dot gnu.org
` (2 preceding siblings ...)
2024-02-16 14:57 ` [Bug other/113957] " iains at gcc dot gnu.org
@ 2024-02-19 20:14 ` cvs-commit at gcc dot gnu.org
2024-02-19 20:19 ` iains at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-19 20:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113957
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:
https://gcc.gnu.org/g:20e57660e64eab7c9ef0f2dd25f3088835f8f44f
commit r14-9072-g20e57660e64eab7c9ef0f2dd25f3088835f8f44f
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Fri Feb 16 14:42:53 2024 +0000
libiberty: Fix error return value in pex_unix_exec_child [PR113957].
r14-5310-g879cf9ff45d940 introduced some new handling for spawning sub
processes. The return value from the generic exec_child is examined
and needs to be < 0 to signal an error. However, the unix flavour of
this routine is returning the PID value set from the posix_spawn{p}.
This latter value is undefined per the manual pages for both Darwin
and Linux, and it seems Darwin, at least, sets the value to some
usually positive number (presumably the PID that would have been used
if the fork had succeeded).
The fix proposed here is to set the pid = -1 in the relevant error
paths.
PR other/113957
libiberty/ChangeLog:
* pex-unix.c (pex_unix_exec_child): Set pid = -1 in the error
paths, since that is used to signal an erroneous outcome for
the routine.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/113957] [14 Regression] bad-mapper-1.C hangs on all Darwin.
2024-02-16 10:53 [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin iains at gcc dot gnu.org
` (3 preceding siblings ...)
2024-02-19 20:14 ` cvs-commit at gcc dot gnu.org
@ 2024-02-19 20:19 ` iains at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-19 20:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113957
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
fixed on trunk.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-19 20:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 10:53 [Bug c++/113957] New: [14 Regression] bad-mapper-1.C hangs on all Darwin iains at gcc dot gnu.org
2024-02-16 10:54 ` [Bug c++/113957] " iains at gcc dot gnu.org
2024-02-16 14:24 ` iains at gcc dot gnu.org
2024-02-16 14:57 ` [Bug other/113957] " iains at gcc dot gnu.org
2024-02-19 20:14 ` cvs-commit at gcc dot gnu.org
2024-02-19 20:19 ` iains at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).