public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions
@ 2013-09-25 7:22 aivchenk at gmail dot com
2013-09-25 7:26 ` [Bug c++/58525] " aivchenk at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: aivchenk at gmail dot com @ 2013-09-25 7:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
Bug ID: 58525
Summary: __cxa_throw_bad_array_new_length is generated with
-fno-exceptions
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: aivchenk at gmail dot com
When I compile the following code (modified version of
g++.dg/cpp0x/bad_array_new1.C without try/catch):
// { dg-options -std=c++11 }
// { dg-do run }
#include <new>
void * f(int i)
{
return new int[i];
}
int main()
{
f(-1);
}
with -fno-exceptions option, I still get the call to
__cxa_throw_bad_array_new_length:
> nm ./bad_array_new1.o | grep cxa
U __cxa_throw_bad_array_new_length
The same goes for __cxa_throw_bad_array_length
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
@ 2013-09-25 7:26 ` aivchenk at gmail dot com
2013-10-02 12:07 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aivchenk at gmail dot com @ 2013-09-25 7:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
--- Comment #1 from Alexander Ivchenko <aivchenk at gmail dot com> ---
Created attachment 30891
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30891&action=edit
Proposed untested fix
Proposed untested fix is attached
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
2013-09-25 7:26 ` [Bug c++/58525] " aivchenk at gmail dot com
@ 2013-10-02 12:07 ` paolo.carlini at oracle dot com
2013-10-10 12:10 ` aivchenk at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-02 12:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Please always send patches to the mailing list: attached to bugs are easily
overlooked or forgotten.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
2013-09-25 7:26 ` [Bug c++/58525] " aivchenk at gmail dot com
2013-10-02 12:07 ` paolo.carlini at oracle dot com
@ 2013-10-10 12:10 ` aivchenk at gmail dot com
2013-11-23 16:28 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aivchenk at gmail dot com @ 2013-10-10 12:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
--- Comment #3 from Alexander Ivchenko <aivchenk at gmail dot com> ---
thanks. I have sent it to gcc-paches:
http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00402.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
` (2 preceding siblings ...)
2013-10-10 12:10 ` aivchenk at gmail dot com
@ 2013-11-23 16:28 ` jason at gcc dot gnu.org
2013-12-30 22:13 ` reichelt at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2013-11-23 16:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Sat Nov 23 16:28:42 2013
New Revision: 205310
URL: http://gcc.gnu.org/viewcvs?rev=205310&root=gcc&view=rev
Log:
PR c++/58525
* call.c (build_operator_new_call): Add flag_exceptions check.
* decl.c (compute_array_index_type): Ditto.
* init.c (build_new_1): Ditto.
(build_vec_init): Ditto.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/decl.c
trunk/gcc/cp/init.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
` (3 preceding siblings ...)
2013-11-23 16:28 ` jason at gcc dot gnu.org
@ 2013-12-30 22:13 ` reichelt at gcc dot gnu.org
2014-01-09 5:19 ` aivchenk at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-12-30 22:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |reichelt at gcc dot gnu.org
--- Comment #5 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Alexander, Jason, can this bug be closed as fixed?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
` (4 preceding siblings ...)
2013-12-30 22:13 ` reichelt at gcc dot gnu.org
@ 2014-01-09 5:19 ` aivchenk at gmail dot com
2014-01-17 18:34 ` reichelt at gcc dot gnu.org
2024-03-27 1:28 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: aivchenk at gmail dot com @ 2014-01-09 5:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
--- Comment #6 from Alexander Ivchenko <aivchenk at gmail dot com> ---
(In reply to Volker Reichelt from comment #5)
> Alexander, Jason, can this bug be closed as fixed?
Yes, it is fixed now in trunk.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
` (5 preceding siblings ...)
2014-01-09 5:19 ` aivchenk at gmail dot com
@ 2014-01-17 18:34 ` reichelt at gcc dot gnu.org
2024-03-27 1:28 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-01-17 18:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Fixed by the patch in comment #3.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58525] __cxa_throw_bad_array_new_length is generated with -fno-exceptions
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
` (6 preceding siblings ...)
2014-01-17 18:34 ` reichelt at gcc dot gnu.org
@ 2024-03-27 1:28 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-27 1:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-03-27 1:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-25 7:22 [Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions aivchenk at gmail dot com
2013-09-25 7:26 ` [Bug c++/58525] " aivchenk at gmail dot com
2013-10-02 12:07 ` paolo.carlini at oracle dot com
2013-10-10 12:10 ` aivchenk at gmail dot com
2013-11-23 16:28 ` jason at gcc dot gnu.org
2013-12-30 22:13 ` reichelt at gcc dot gnu.org
2014-01-09 5:19 ` aivchenk at gmail dot com
2014-01-17 18:34 ` reichelt at gcc dot gnu.org
2024-03-27 1:28 ` pinskia 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).