This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C



------- Comment #4 from jason at gcc dot gnu dot org  2010-07-13 21:51 -------
I disagree with the analysis.  In fact, QMapData::shared_null correctly gets
32-bit DECL_ALIGN once we walk the pending_statics vector in
finish_record_layout.  But this is irrelevant.

The problem is that at the point of the error we're trying to use
&QVectorData::shared_null, which properly has 8-bit alignment, as a
QVectorTypedData*.  This seems to be a problem with the testcase: the QVector
constructor first initializes the p member of the anonymous union with
&QVectorData::shared_null and then tries to access the ref member of the d
member of the anonymous union, but that memory access would spill off the end
of the actual referent of the pointer.

Do you agree that the problem is that the testcase is undefined?


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
         AssignedTo|jason at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]