Compile-Time Validationvec[index] = 0; // valid vec.clear(); vec[index] = 2; // invalid }Goals – Control Flow Validate based of control flow for: if/else, for loops, etc... void foo() { my_vectorvec = { /* .. 1} });Control Flow Record and validate control flow enum class control_flow { if_, else_if, for_, return_, /*...*/ }; if (cond) { M::add<control_flow::if_>; } M::add<control_flow::end_scope>;Macro space */ }));Control Flow - Parsing Parse string of code into a control flow enum value constexpr control_flow parse_control(std::string_view str) { if (str == "{") return control_flow::start_scope; 0 码力 | 137 页 | 1.70 MB | 6 月前3
The Roles of Symmetry And Orthogonality In Designobject is destroyed Stack-based (automatic) data objects • Is symmetry to define state based on control-flow (static lexical scoping) • Edge cases managed by the C++ Standard (Guaranteed!) “The compiler object is destroyed Stack-based (automatic) data objects • Is symmetry to define state based on control-flow (static lexical scoping) • Edge cases managed by the C++ Standard (Guaranteed!) “The compiler taketh away” Heap-based (dynamic) data objects • Is symmetry to define state independent of control-flow (static lexical scoping) • Edge cases managed by the developer “The developer giveth, and the0 码力 | 151 页 | 3.20 MB | 6 月前3
Exceptionally Bad: The Story on the Misuse of Exceptions and How to Do BetterExceptions were designed for ? • Program has encountered a serious error, and getting out of this control flow to prevent data corruption or other damage is more important than trying to continue onward handling if the event doesn't occur often, that is, if the event is truly exceptional How much of your flow (upper-bound) should be taking exception paths ? • Does anyone measure this ? How do I handle “frequent” Exception is in a loop and has a conditional rethrow; Conclusion : Use a return status for loop control 37 Bloomberg Exceptional TrierSituation : Any problem whatsoever, throw an exception. Exceptions0 码力 | 85 页 | 2.32 MB | 6 月前3
Embracing an Adversarial Mindset for Cpp SecurityReconnaissance Intrusion Exploitation Privilege Escalation Persistence & Evasion Command & Control Lateral Movement ExfiltrationWhy Elevation of Privilege (EoP)? ● Crucial for lateral movement Reconnaissance Intrusion Exploitation Privilege Escalation Persistence & Evasion Command & Control Lateral Movement ExfiltrationWhy Security Feature Bypasses? ● Widespread Adoption of Security Reconnaissance Intrusion Exploitation Privilege Escalation Persistence & Evasion Command & Control Lateral Movement ExfiltrationNotable Exploits Used in the Wild 2021-2023 Notable exploits and0 码力 | 92 页 | 3.67 MB | 6 月前3
Conan 1.19 Documentation. . . . . . . . . . . . . . . . . . . . . . 69 7 Developing packages 75 7.1 Package development flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 7.2 Packages in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 13.5 Version Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 13 The generated files are usually temporary, created in build folders and not committed to version control, as they have paths to local folders that will not exist in another machine. Moreover, it is very0 码力 | 609 页 | 4.88 MB | 1 年前3
Conan 1.20 Documentation. . . . . . . . . . . . . . . . . . . . . . 69 7 Developing packages 75 7.1 Package development flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 7.2 Packages in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 13.5 Version Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 13 The generated files are usually temporary, created in build folders and not committed to version control, as they have paths to local folders that will not exist in another machine. Moreover, it is very0 码力 | 611 页 | 4.89 MB | 1 年前3
Conan 1.16 Documentation. . . . . . . . . . . . . . . . . . . . . . 68 7 Developing packages 75 7.1 Package development flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 7.2 Packages in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 12.5 Version Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 12 The generated files are usually temporary, created in build folders and not committed to version control, as they have paths to local folders that will not exist in another machine. Moreover, it is very0 码力 | 545 页 | 4.34 MB | 1 年前3
Conan 1.18 Documentation. . . . . . . . . . . . . . . . . . . . . . 67 7 Developing packages 73 7.1 Package development flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 7.2 Packages in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 13.5 Version Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 13 The generated files are usually temporary, created in build folders and not committed to version control, as they have paths to local folders that will not exist in another machine. Moreover, it is very0 码力 | 584 页 | 4.80 MB | 1 年前3
Conan 1.26 Documentation. . . . . . . . . . . . . . . . . . . . . . 79 7 Developing packages 85 7.1 Package development flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 7.2 Packages in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 13.6 Version Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 13 Community Edition (CE) is the recommended Conan server to host your own packages privately under your control. Conan is mature and stable, with a strong commitment to forward compatibility (non-breaking policy)0 码力 | 669 页 | 5.51 MB | 1 年前3
Conan 1.17 Documentation. . . . . . . . . . . . . . . . . . . . . . 70 7 Developing packages 77 7.1 Package development flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 7.2 Packages in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 13.5 Version Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 13 The generated files are usually temporary, created in build folders and not committed to version control, as they have paths to local folders that will not exist in another machine. Moreover, it is very0 码力 | 567 页 | 4.53 MB | 1 年前3
共 185 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19













