Benchmark && static initialisation order fiasco #18

BenPope opened this Issue Oct 30, 2012 · 1 comment


None yet
4 participants

BenPope commented Oct 30, 2012

It seems to me that folly::benchmarks (the vector) is subject to static initialisation order fiasco.

All my tests are constructed, "adding them" to benchmarks, and then benchmarks is initialised :(


This comment has been minimized.

Show comment Hide comment

tudor Oct 30, 2012


We'll take a look, thanks for letting us know.


tudor commented Oct 30, 2012

We'll take a look, thanks for letting us know.

@ghost ghost assigned andralex Oct 30, 2012

djwatson added a commit that referenced this issue Dec 11, 2014

Fixing static initilize fiasco in Benchmark.cpp
Benchmark.cpp code is dependent on initialization order, which leads
to benchmarks not running. The root cause is that on some linkers the code which
adds benchmarks to the benchmarks vector is run before the vector initialization.

The original bug report: #18

Test Plan: run benchmark_test and compare result with master output

Reviewed By:,

Subscribers: trunkagent, sdwilsh, folly-diffs@

FB internal diff: D1710588

Signature: t1:1710588:1417468175:fd2705a573cef5c4ff020b60c6aec3d83bcdbbab

@marcinpe marcinpe closed this Jan 25, 2015

@tdauth tdauth referenced this issue Mar 3, 2017


Clang crash #555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment