LLVM's Realtime Safety Revolution: Tools for Modern Mission Critical Systems
#2 0x104429450 in std::__1::__libcpp_allocate[abi:v160006](unsigned long, unsigned long)+0x44 > clang -fsanitize=address main.cpp #includeint main() { auto v = std::vector (16); RealtimeSanitizer (RTSan) float process(float x) { auto const y = std::vector (16); ... } > clang++ -fsanitize=realtime main.cpp > ./a.out ==86660==ERROR: RealtimeSanitizer: unsafe-library-call Intercepted cpp:6:14 #12 0x102c02c00 in main+0x1c /app/example.cpp:12:5 [[clang::nonblocking]]Two steps 1. Attribute real-time functions with [[clang::nonblocking]] 2. Compile and link with -fsanitize=realtime 0 码力 | 153 页 | 1.38 MB | 5 月前32020: The Year of Sanitizers?
2020: The Year of Sanitizers? Victor Ciura Principal Engineer @ciura_victor2 Abstract Clang-tidy is the go-to assistant for most C++ programmers looking to improve their code, whether to modernize smart tools, you have to try dynamic/runtime analysis. After years of improvements and successes for Clang and GCC users, LLVM AddressSanitizer (ASan) is finally available on Windows, in the latest Visual under active development 3.5 million lines of C++ code a few brave nerds… or “How we manage to clang-tidy our whole code base, while maintaining our monthly release cycle” Why Do I Care ? 2020 Victor0 码力 | 135 页 | 27.77 MB | 5 月前3Extending and Simplifying C++: Thoughts on Pattern Matching using 'is' and 'as', and Can C++ be 10x Simpler & Safer?
and 30" << std::endl; } 2Or like that? x as Type; 31 If you have C++20 compiler (GCC 10+, Clang 12+, MSVC 16.30+) Available now!Advancing cppfront with Modern C++ Refining the Implementation Compiler Explorer! g++-10 Clang-12 MSVC v19.29 33x is Type • Avoid type traits, • Avoid negations & parens, • Use Compiler Explorer! • Use std::false_type / true_types g++-10 Clang-12 MSVC v19.29 34355 const& value ) inline constexpr bool is( auto const& x, auto const& value ) 38x is value g++-10 Clang-12 MSVC v19.29 inline constexpr bool is( auto const& x, auto const& value ) { if constexpr (requires{0 码力 | 108 页 | 5.08 MB | 5 月前3Just-In-Time Compilation: The Next Big Thing
COMPILED C++ EASY-JIT EASY-JIT 4 . 2EXISTING SOLUTIONS - C++ EXISTING SOLUTIONS - C++ / / [[CLANG::JIT]] [[CLANG::JIT]] - - * WITH CUSTOM MODIFICATIONS * WITH CUSTOM MODIFICATIONS CLING CLING RUNTIME EASY-JIT P1609R1 P1609R1 4 . 2EXISTING SOLUTIONS - C++ EXISTING SOLUTIONS - C++ / / [[CLANG::JIT]] [[CLANG::JIT]] - - **** * WITH CUSTOM MODIFICATIONS * WITH CUSTOM MODIFICATIONS ** COMPILE-TIME P1609R1 D MIXIN D MIXIN 4 . 2EXISTING SOLUTIONS - C++ EXISTING SOLUTIONS - C++ / / [[CLANG::JIT]] [[CLANG::JIT]] - - **** * WITH CUSTOM MODIFICATIONS * WITH CUSTOM MODIFICATIONS ** COMPILE-TIME0 码力 | 222 页 | 5.45 MB | 5 月前3Hidden Overhead of a Function API
device 19armv8-a System V ABI Procedure Call Standard for the Arm® 64-bit Architecture armv8-a clang 18.1.0 -O2 -std=c++20 x86-64 (AMD64) System V ABI AMD64 Architecture Processor Supplement x86-64 -O2 /std:c++20 armv7-a System V ABI Procedure Call Standard for the Arm® Architecture armv7-a clang 11.0.1 -O2 -std=c++20 x86 (IA-32) System V ABI Intel386 Architecture Processor Supplement x86-64 = nullptr; } - return by value - output parameter 24 https://godbolt.org/z/ea9M3G94sarmv8-a clang 18.1.0 x86-64 gcc 14.2 x64 msvc v19.40 VS17.10 str xzr, [x8] ret mov QWORD PTR [rdi], 0 mov0 码力 | 158 页 | 2.46 MB | 5 月前3Conan 1.26 Documentation
compiler and any version. There are defaults definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard library, etc. This available in Conan Center repository in Bintray, such as Visual Studio 14, 15, Linux GCC 4.9 and Apple Clang 3.5... Conan will throw an error if the binary package required for specific settings doesn’t exist example of a configuration that a profile file may contain: Listing 1: clang_3.5 [settings] os=Macos arch=x86_64 compiler=clang compiler.version=3.5 compiler.libcxx=libstdc++11 build_type=Release (continues0 码力 | 669 页 | 5.51 MB | 1 年前3Mastering C++ Modules
module B; export void b() { }Built Module Interface (BMI) • MSVC – .ifc file • G++ – .gcm file • Clang – .pcm • http://www.open-std.org/jtc1/sc22/wg21/doc s/papers/2020/p1838r0.pdf 12Simple Example cmake_ninja_dyndep 21Where we are today • Support for p1689r5 in compiler releases – Visual studio 2022 – Clang 16 and newer – GCC 14 • CMake 3.28 support for modules • CMake 3.29 experimental support for import identification is Clang 20.0.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/hoffman/Work/llvm/llvm-inst/bin/clang++ - skipped -- Detecting0 码力 | 77 页 | 9.07 MB | 5 月前3Conan 1.25 Documentation
compiler and any version. There are defaults definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard library, etc. This available in Conan Center repository in Bintray, such as Visual Studio 14, 15, Linux GCC 4.9 and Apple Clang 3.5... Conan will throw an error if the binary package required for specific settings doesn’t exist example of a configuration that a profile file may contain: Listing 1: clang_3.5 [settings] os=Macos arch=x86_64 compiler=clang compiler.version=3.5 compiler.libcxx=libstdc++11 build_type=Release (continues0 码力 | 655 页 | 5.45 MB | 1 年前3Conan 1.31 Documentation
compiler and any version. There are defaults definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard library, etc. This versions available in Conan Center repository, such as Visual Studio 14, 15, Linux GCC 4.9 and Apple Clang 3.5. Up to >130 different binaries for different configurations can be available in ConanCenter. But example of a configuration that a profile file may contain: Listing 1: clang_3.5 [settings] os=Macos arch=x86_64 compiler=clang compiler.version=3.5 compiler.libcxx=libstdc++11 build_type=Release (continues0 码力 | 721 页 | 5.41 MB | 1 年前3Conan 1.24 Documentation
compiler and any version. There are defaults definitions for the most popular ones: gcc, cl.exe, clang, apple-clang, intel, with different configurations of versions, runtimes, C++ standard library, etc. This available in Conan Center repository in Bintray, such as Visual Studio 14, 15, Linux GCC 4.9 and Apple Clang 3.5... Conan will throw an error if the binary package required for specific settings doesn’t exist example of a configuration that a profile file may contain: Listing 1: clang_3.5 [settings] os=Macos arch=x86_64 compiler=clang compiler.version=3.5 compiler.libcxx=libstdc++11 build_type=Release (continues0 码力 | 647 页 | 5.31 MB | 1 年前3
共 600 条
- 1
- 2
- 3
- 4
- 5
- 6
- 60