{"id":12602,"date":"2014-02-21T23:08:18","date_gmt":"2014-02-22T05:08:18","guid":{"rendered":"http:\/\/bucktownbell.com\/?p=12602"},"modified":"2014-02-22T00:21:26","modified_gmt":"2014-02-22T06:21:26","slug":"are-we-shooting-ourselves-in-the-foot-with-stack-overflow","status":"publish","type":"post","link":"http:\/\/bucktownbell.com\/?p=12602","title":{"rendered":"Are We Shooting Ourselves in the Foot with Stack Overflow?"},"content":{"rendered":"<blockquote><p>Unless you\u2019ve been living under a rock for a past couple of years, you must have heard of the Toyota unintended acceleration (UA) cases, where Camry and other Toyota vehicles accelerated unexpectedly and some of them managed to kill people and all of them scared the hell out of their drivers.<\/p>\n<p>The recent <a title=\"Court deposition of Michael Barr\" href=\"http:\/\/www.safetyresearch.net\/Library\/Bookout_v_Toyota_Barr_REDACTED.pdf\" target=\"_blank\">trial testimony<\/a>\u00a0delivered at the <a title=\"Toyota Case: Single Bit Flip That Killed\" href=\"http:\/\/www.eetimes.com\/document.asp?doc_id=1319903\" target=\"_blank\">Oklahoma trial<\/a> by an <a title=\"Michael Barr on EmbeddedGurus.com\" href=\"http:\/\/embeddedgurus.com\/embedded-systems-bloggers\/michael-barr\/\" target=\"_blank\">embedded guru<\/a>\u00a0<strong>Michael Barr<\/strong>\u00a0for the fist time in history of these trials offers a glimpse into the Toyota throttle control software. In his deposition, Michael explains how a <strong>stack overflow<\/strong>\u00a0could corrupt the critical variables of the operating system (OSEK in this case), because they were located in memory adjacent to the top of the stack. The following two slides from Michael\u2019s testimony explain the memory layout around the stack and why stack overflow was likely in the Toyota code (see the <a title=\"Barr's slides\" href=\"http:\/\/www.safetyresearch.net\/Library\/BarrSlides_FINAL_SCRUBBED.pdf\" target=\"_blank\">complete set of Michael\u2019s slides<\/a>).<\/p><\/blockquote>\n<p>via <a href=\"http:\/\/embeddedgurus.com\/state-space\/2014\/02\/are-we-shooting-ourselves-in-the-foot-with-stack-overflow\/\">Are We Shooting Ourselves in the Foot with Stack Overflow? \u00ab State Space<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unless you\u2019ve been living under a rock for a past couple of years, you must have heard of the Toyota unintended acceleration (UA) cases, where Camry and other Toyota vehicles accelerated unexpectedly and some of them managed to kill people &hellip; <a href=\"http:\/\/bucktownbell.com\/?p=12602\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[942,114,1270,176],"class_list":["post-12602","post","type-post","status-publish","format-standard","hentry","category-programming","tag-bugs","tag-computer-architecture","tag-control-systems","tag-embedded-systems"],"_links":{"self":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/12602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12602"}],"version-history":[{"count":1,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/12602\/revisions"}],"predecessor-version":[{"id":12603,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/12602\/revisions\/12603"}],"wp:attachment":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12602"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}