[cfi][test] cross-dso/stats.cpp: don't assume the order of static constructors
authorFangrui Song <maskray@google.com>
Wed, 8 Jan 2020 23:44:35 +0000 (15:44 -0800)
committerFangrui Song <maskray@google.com>
Wed, 8 Jan 2020 23:50:51 +0000 (15:50 -0800)
commit7f1026a7520eb3d7e99da77f6738deb72de17980
treeb2a1cec598f7555894548d6c8e259859a438e9bd
parentf84d3200528a4aa1e8c7f2d3a9567f63f855b165
[cfi][test] cross-dso/stats.cpp: don't assume the order of static constructors

__sanitizer_stat_init is called for the executable first, then the
shared object. In WriterModuleReport(), the information for the shared
object will be recorded first. It'd be nice to get rid of the order
requirement of static constructors. (This should make .ctors platforms
work.)
compiler-rt/test/cfi/cross-dso/stats.cpp