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 sanitizer/55617] static constructors are not being instrumented correctly on darwin


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

--- Comment #30 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 07:31:24 UTC ---
Don't want to spend too much time on this, so just a few hints:
1) you want to store this in a vector (see vec.h)
2) rtxs are GC allocated, you don't want to copy_rtx it, but instead mark the
   structure with GTY(()), mark also the vector var with GTY(()) and make it
   va_gc vector (see doc/gty.texi, and grep around for GTY.*vec.*va_gc
   and see how they are used
3) you want a stable sort, thus sorting on priority is not enough, you need to
   also record the original position in the list and sort by priority first,
   and then by original position (so that all ctors with the same position
   go in the original order)
4) watch formatting, you're violating GNU Coding Conventions in several ways


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