[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-515115-105":59,"doc-detail-515115-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","a-framework-for-systematically-addressing-undefined-behaviour-in-the-c-standard-proposal-systematic-detection-mitigation-and-elimination","A framework for systematically addressing undefined behaviour in the C++ Standard - Proposal - systematic detection, mitigation, and elimination","","A framework enumerates all core-language cases of undefined behaviour explicitly specified in the C++ Standard, groups them into ten categories, and classifies them using multiple relevant criteria. The paper proposes a holistic strategy to systematically detect, mitigate, and eliminate such undefined behaviour, built from seven tools including feature removal, refined and erroneous behaviour, runtime checks via implicit contract assertions, language subsetting, annotations, and new language features.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/a-framework-for-systematically-addressing-undefined-behaviour-in-the-c-standard-proposal-systematic-detection-mitigation-and-elimination/515115/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/a-framework-for-systematically-addressing-undefined-behaviour-in-the-c-standard-proposal-systematic-detection-mitigation-and-elimination/515115.png","ImageObject",300,407,{"name":92,"@type":93},"Fahsai","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-16","2026-10-06",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does the paper enumerate and how is it organized?","Question",{"text":112,"@type":113},"It enumerates all core language undefined behaviour cases explicitly specified in the C++ Standard, groups them into ten categories, and classifies them using multiple relevant criteria.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What overall strategy does the paper propose?",{"text":117,"@type":113},"It presents a holistic approach to detect, mitigate, and eliminate undefined behaviour, built from seven tools including feature removal, refined/erroneous behaviour, runtime checks, language subsetting, annotations, and new language features.",{"name":119,"@type":110,"acceptedAnswer":120},"How are runtime checks introduced in the proposed framework?",{"text":121,"@type":113},"Runtime checks are systematically introduced via implicit contract assertions, giving users control over the impact of undefined behaviour; when possible, undefined behaviour is replaced by erroneous but well-defined behaviour to allow execution to continue.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},515115,1792171923,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":146,"preview_urls":147},549768702563,"https://ap-avatar.wpscdn.com/avatar/8000c4aa63b76e948b?x-image-process=image/resize,m_fixed,w_180,h_180&k=1786536092046926083","A framework for systematically addressing undefined behaviour in the C++ Standard  \nTimur Doumler ([papers@timur.audio](papers@timur.audio))  \nJoshua Berne ([jberne4@bloomberg.net](jberne4@bloomberg.net))  \nDocument \\#: P3100R7 Date: 2026-06-01  \nProject: Programming Language C++  \nAudience: EWG, LEWG  \nAbstract  \nIn this paper, we enumerate all cases of core language undefined behaviour explicitly specified in the C++ Standard, group them into ten categories, and classify them along a number of relevant criteria.  \nWe then present a holistic strategy for systematically detecting, mitigating, and ultimately eliminating such undefined behaviour from the C++ Standard. This strategy is built on top of seven basic tools: feature removal, refined behaviour, erroneous behaviour, insertion of runtime checks, language subsetting, the introduction of annotations, and the introduction of entirely new language features. We discuss which tools are applicable to which cases of core language undefined behaviour.  \nWe find that two of these tools—erroneous behaviour and runtime checks—are applicable toa wide range of existing cases and do not require any source changes. We describe how runtime checks can be systematically introduced via implicit contract assertions, giving users complete control over what impact that undefined behaviour has on their programs. In addition to runtime checking, we replace undefined behaviour with erroneous, but well-defined behaviour that allows the program to continue execution past a violated implicit contract assertion wherever possible.  \nBuilding on Contracts as adopted for C++26, we provide a generic framework for applying these two techniques across the entire C++ language specification, fundamentally changing the landscape of how undefined behaviour is approached in C++ .  \nContents  \n1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n2 History and polls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n3 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n3. 1 Enumeration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n3.1.1 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n3.1.2 Granularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7  \n3.1.3 Scope   7  \n3.2 Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8  \n3.2.1 Categories ...................................... 8  \n3.2.2 Relevance for security ................................ 10  \n3.3 Diagnosability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10  \n3.3.1 Static vs. dynamic diagnosis ............................ 11  \n3.3.2 Locality of diagnosis ................................ 11  \n3.3.3 Cost of local diagnosis ............................... 13  \n3.3.4 Cost of non-local diagnosis ............................. 14  \n3.4 Existence of replacement behaviour   15  \n4 Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17  \n4. 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18  \n4.2 Scope   18  \n4.3 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4.3. 1 Feature removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4.3.2 Refined behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4.3.3 Erroneous behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20  \n4.3.4 Runtime checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20  \n4.3.5 Language subsetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21  \n4.3.6 Annotations . . . . . . . . . . . . . . . . . . . . . . . . ","cbCaicrPg1Rdb2LP","https://ap.wps.com/l/cbCaicrPg1Rdb2LP","pdf",1644786,102,"English","# Introduction\n# History and polls\n# Analysis\n## Enumeration\n## Classification\n## Diagnosability\n## Existence of replacement behaviour\n# Strategy\n## Overview\n## Tools\n# Proposed design\n## Defining implicit contract assertions\n## Applying implicit contract assertions\n## Defining replacement behaviour\n## Providing an escape hatch\n## Interaction with noexcept\n## Extending the library API\n# Proposed wording\n# Future extensions\n## Identifying the UB category\n## Granular control of the evaluation semantic\n## Integrating assertions and assumptions\n# Acknowledgements\n# References\n# Appendix A: List of language UB","[{\"question\":\"What does the paper enumerate and how is it organized?\",\"answer\":\"It enumerates all core language undefined behaviour cases explicitly specified in the C++ Standard, groups them into ten categories, and classifies them using multiple relevant criteria.\"},{\"question\":\"What overall strategy does the paper propose?\",\"answer\":\"It presents a holistic approach to detect, mitigate, and eliminate undefined behaviour, built from seven tools including feature removal, refined/erroneous behaviour, runtime checks, language subsetting, annotations, and new language features.\"},{\"question\":\"How are runtime checks introduced in the proposed framework?\",\"answer\":\"Runtime checks are systematically introduced via implicit contract assertions, giving users control over the impact of undefined behaviour; when possible, undefined behaviour is replaced by erroneous but well-defined behaviour to allow execution to continue.\"}]","A framework for systematically addressing undefined behaviour in the C++ Standard - Proposal - systematic detection, mitigation, and elimination | PDF",1791307170,257,11,[148,152,156,160,164,168,172,176,180,184,188],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f26204a01c52d0545116ccc730a8dfe9.webp",983,1390,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/210dcacba361a41ab80786ab271b28fe.webp",982,1388,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/92f86e4a790a388e2cb8d8e15ee1d758.webp",981,1387,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2a12c710c29a9adf4a60950de026d953.webp",980,1385,{"page_no":24,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0c0989e42673f9606a257ba5c0134844.webp",979,1384,{"page_no":29,"url":169,"width":170,"height":171},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/201524022f258ced628da803715f0511.webp",978,1383,{"page_no":34,"url":173,"width":174,"height":175},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ad7e5bbc8ddd66402ac745846d797253.webp",977,1381,{"page_no":39,"url":177,"width":178,"height":179},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ed7748ec2052339636c409df4b935434.webp",976,1380,{"page_no":44,"url":181,"width":182,"height":183},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a0eb516992d162fe19c666964b15e830.webp",975,1378,{"page_no":52,"url":185,"width":186,"height":187},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/12d101c7b75ea6722b081954ef1e638a.webp",974,1377,{"page_no":146,"url":189,"width":190,"height":191},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/9b7f4265de503c59a3c42906608f2ba0.webp",973,1376]