This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/55617] static constructors are not being instrumented correctly on darwin
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Feb 2013 21:45:42 +0000
- Subject: [Bug sanitizer/55617] static constructors are not being instrumented correctly on darwin
- Auto-submitted: auto-generated
- References: <bug-55617-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55617
--- Comment #33 from Jack Howarth <howarth at nitro dot med.uc.edu> 2013-02-01 21:45:42 UTC ---
Replacing the...
ctors->qsort (sort_by_ctor_priority);
with...
qsort(ctors, ctor_index+1, sizeof(ctor_record), sort_by_ctor_priority);
appears to solve the bootstrap issues. Mike Stump suggested that we use the
stable_sort from c++ to achieve the sort in one pass. Is it possible to pass a
va_gc to stable_sort? In particular, how do we get first and last positions to
pass as described in http://www.cplusplus.com/reference/algorithm/stable_sort/?