File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ // ===----------------------------------------------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ #include < iostream>
10+
11+ extern " C" const char *__asan_default_options () {
12+ return " check_initialization_order=true:strict_init_order=true" ;
13+ }
14+
15+ // Test that ios used from globals constructors doesn't trigger
16+ // Asan initialization-order-fiasco.
17+
18+ struct Global {
19+ Global () {
20+ std::cout << " Hello!" ;
21+ }
22+ } global;
23+
24+ int main (int , char **)
25+ {
26+ return 0 ;
27+ }
You can’t perform that action at this time.
0 commit comments