This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45249] Indirect variable parameters sometimes cause segmentation fault
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2010 00:58:38 -0000
- Subject: [Bug c++/45249] Indirect variable parameters sometimes cause segmentation fault
- References: <bug-45249-19547@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from pinskia at gcc dot gnu dot org 2010-08-11 00:58 -------
>Then, by another well defined attribute (the calling convention) I should be
able to navigate the stack to get the other parameters.
No, the C/C++ standard says doing that is undefined because the array size is
1. That is the point I am trying to make, you are depending on undefined
behavior as defined by the C/C++ standards. Going past the bounds of an array
is undefined. This is well known that it causes undefined behavior. Yes
&argument is defined but it is defined only be accessed to that address no
others.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45249