This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Your patch to init.c
- To: gcc at gcc dot gnu dot org
- Subject: Your patch to init.c
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 12 Nov 1999 09:33:38 -0800
- Cc: dnovillo at cygnus dot com
- Reply-to: mark at codesourcery dot com
Diego --
I am concerned about several aspects of this patch:
* init.c (init_init_processing): Header information for
arrays allocated via `new' should have the same alignment used by
malloc.
In particular:
o That patch was never posted to gcc-patches, either for review, or
indicating that it was pre-approved by one of the maintainers.
o You are not listed in `MAINTAINERS' as `write-after-approval'. Is
all of Cygnus implicitly write-after-approval? (If so, there are
some mild implications worth considering, but that's another
story.)
o There should be a comment in the code explaining why you selected
BIGGEST_ALIGNMENT.
o Most importantly, that patch potentially breaks the C++ ABI on
various platforms, even if correct in the abstract. If there are
extant platforms on which you have changed the size or alignment
of this type, it may have become impossible to allocate an array
in a newly compiled .o and delete it from a previously compiled
.o, or vice versa. In particular, if the offset from the cookie
to the first element in the array has changed, it's likely that
destructors will be passed incorrect addresses.
It may be that the patch is safe, but that needs to be justified.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com