Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 237007 Details for
Bug 326273
Thread local storage miscompiles
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
minimal testcase
tls.cc (text/plain), 572 bytes, created by
Łukasz Michalik
on 2010-06-30 08:40:31 UTC
(
hide
)
Description:
minimal testcase
Filename:
MIME Type:
Creator:
Łukasz Michalik
Created:
2010-06-30 08:40:31 UTC
Size:
572 bytes
patch
obsolete
>#include <cstdlib> > >struct S >{ > static S * * get_instance_ptr() > { > static S * instance(0); > return &instance; > } > > static S * get_instance() > { > S * * i(get_instance_ptr()); > if (0 == *i) > { > static __thread bool f(false); > if (f) > throw "bleh"; > *i = new S; > } > return *i; > } > > bool ok() > { > return true; > } >}; > >int main(int, char *[]) >{ > return S::get_instance()->ok() ? EXIT_SUCCESS : EXIT_FAILURE; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 326273
: 237007