{"id":8655,"date":"2014-04-02T17:45:58","date_gmt":"2014-04-02T21:45:58","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=8655"},"modified":"2014-04-02T17:45:58","modified_gmt":"2014-04-02T21:45:58","slug":"implementing-plausible-crash-recovery","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/04\/02\/implementing-plausible-crash-recovery\/","title":{"rendered":"Implementing Plausible Crash Recovery"},"content":{"rendered":"<p><a href=\"https:\/\/www.plausible.coop\/blog\/?p=263\">Landon Fuller<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.plausible.coop\/blog\/?p=263\"><p>The &nbsp;alternative approach, and what is used on Apple&rsquo;s 64-bit platforms, is the use of so-called&nbsp;<em>zero-cost exceptions<\/em>. Rather than recording thread state at runtime, the&nbsp;<em>compiler<\/em>&nbsp;builds a lookup table that covers&nbsp;<em>all code<\/em>in an executable. This table defines how to accurately unwind a single frame from&nbsp;<em>any valid instruction address<\/em>, as well as providing language\/runtime-specific definitions of where try\/catch\/finally blocks are defined, and how to handle them.<\/p>\n<p>[&#8230;]<\/p>\n<p>As it turns out, this is exactly the same information that debuggers, crash reporters, and evil crash recovery hacks need to perform their own stack unwinding.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Landon Fuller: The &nbsp;alternative approach, and what is used on Apple&rsquo;s 64-bit platforms, is the use of so-called&nbsp;zero-cost exceptions. Rather than recording thread state at runtime, the&nbsp;compiler&nbsp;builds a lookup table that covers&nbsp;all codein an executable. This table defines how to accurately unwind a single frame from&nbsp;any valid instruction address, as well as providing language\/runtime-specific definitions [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[56,30,74,752,71],"class_list":["post-8655","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-debugging","tag-mac","tag-opensource","tag-plcrashreporter","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=8655"}],"version-history":[{"count":0,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8655\/revisions"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=8655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=8655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=8655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}