public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits
       [not found] <bug-86130-4@http.gcc.gnu.org/bugzilla/>
@ 2023-07-09 21:33 ` pinskia at gcc dot gnu.org
  2023-07-10  8:31 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-09 21:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mimomorin at gmail dot com

--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 109891 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits
       [not found] <bug-86130-4@http.gcc.gnu.org/bugzilla/>
  2023-07-09 21:33 ` [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits pinskia at gcc dot gnu.org
@ 2023-07-10  8:31 ` redi at gcc dot gnu.org
  2023-10-08 17:45 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-10  8:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-07-10

--- Comment #18 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #13)
> I think there would need to be a period of deprecation and an optional
> assertion enabled by _GLIBCXX_ASSERTIONS before we can do that (assuming we
> want to).

As I said in the PR 109891 dup, _GLIBCXX_DEBUG_PEDANTIC exists for precisely
this kind of case:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_semantics.html

So let's add that for now.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits
       [not found] <bug-86130-4@http.gcc.gnu.org/bugzilla/>
  2023-07-09 21:33 ` [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits pinskia at gcc dot gnu.org
  2023-07-10  8:31 ` redi at gcc dot gnu.org
@ 2023-10-08 17:45 ` pinskia at gcc dot gnu.org
  2023-10-08 18:38 ` llvm at rifkin dot dev
  2023-10-08 23:15 ` llvm at rifkin dot dev
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-08 17:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llvm at rifkin dot dev

--- Comment #19 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 111729 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits
       [not found] <bug-86130-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-10-08 17:45 ` pinskia at gcc dot gnu.org
@ 2023-10-08 18:38 ` llvm at rifkin dot dev
  2023-10-08 23:15 ` llvm at rifkin dot dev
  4 siblings, 0 replies; 5+ messages in thread
From: llvm at rifkin dot dev @ 2023-10-08 18:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130

--- Comment #20 from Jeremy R. <llvm at rifkin dot dev> ---
Silently ruining the behavior of the rest of a program and leaving the
programmer to pull their hair out over what on earth is happening seems very
un-ideal behavior.

This is a very easy mistake to make and the current behavior makes tracking
down that mistake exceedingly difficult.

I do recognize the concerns here about existing programs and crashing being
arguably less friendly, but something should be done here. 

Libc++ and msvc's stl both segfault and there's some value in making the
behavior here consistent.

(In reply to Jonathan Wakely from comment #13)
> I'm not suggesting we should print "(null)", that would be crazy
Maybe, but it's also a nice middle ground between silently corrupting the
stream and crashing the program.

Throwing an exception, even only in debug, also seems reasonable as existing
programs may be able to recover from the exception without crashing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits
       [not found] <bug-86130-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-10-08 18:38 ` llvm at rifkin dot dev
@ 2023-10-08 23:15 ` llvm at rifkin dot dev
  4 siblings, 0 replies; 5+ messages in thread
From: llvm at rifkin dot dev @ 2023-10-08 23:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130

--- Comment #21 from Jeremy R. <llvm at rifkin dot dev> ---
Another option might be just do nothing and don't set the badbit, just pretend
it's an empty string. This shouldn't break existing programs and would at least
be something a programmer could more easily track down.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-08 23:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-86130-4@http.gcc.gnu.org/bugzilla/>
2023-07-09 21:33 ` [Bug libstdc++/86130] Expect SIGSEGV but program just silently exits pinskia at gcc dot gnu.org
2023-07-10  8:31 ` redi at gcc dot gnu.org
2023-10-08 17:45 ` pinskia at gcc dot gnu.org
2023-10-08 18:38 ` llvm at rifkin dot dev
2023-10-08 23:15 ` llvm at rifkin dot dev

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).