folly:: singleton: ubsan: fix calling overriden method from ctor
authorLucian Grijincu <lucian@fb.com>
Tue, 21 Jun 2016 20:40:46 +0000 (13:40 -0700)
committerFacebook Github Bot 1 <facebook-github-bot-1-bot@fb.com>
Tue, 21 Jun 2016 20:53:37 +0000 (13:53 -0700)
commit31fa09caf910f576682b4832e744b6183358d904
treec53b71a2180c5336dea0107f702fcf07a3a65b26
parent4b7d98cb635fe2666ef0ce0d809634080eb0dcf7
folly:: singleton: ubsan: fix calling overriden method from ctor

Summary:
Ubsan complains when overriden method is called from ctor:
```
0x000000b04d40: note: object is of type 'folly::detail::SingletonHolder<XYZ>' 00 00 00 00  08 50 c3 8d da 7f 00 00  e8 4f c3 8d da 7f 00 00  18 0d 4c b4 da 7f 00 00  a0 16 90 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'folly::detail::SingletonHolder<XYZ>'
```

called from `folly::SingletonVault::registerSingleton(folly::detail::SingletonHolderBase*)`

Reviewed By: ot

Differential Revision: D3462037

fbshipit-source-id: 6df283dd53df42d5d318990f60aba370ceed6395
folly/Singleton-inl.h
folly/Singleton.h