{"id":16678,"date":"2016-12-20T10:37:58","date_gmt":"2016-12-20T15:37:58","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=16678"},"modified":"2016-12-20T10:37:58","modified_gmt":"2016-12-20T15:37:58","slug":"dtrace-at-home","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/12\/20\/dtrace-at-home\/","title":{"rendered":"DTrace at Home"},"content":{"rendered":"<p><a href=\"http:\/\/dtrace.org\/blogs\/ahl\/2016\/12\/18\/dtrace-at-home\/\">Adam Leventhal<\/a>:<\/p>\n<blockquote cite=\"http:\/\/dtrace.org\/blogs\/ahl\/2016\/12\/18\/dtrace-at-home\/\"><p>I&rsquo;m not the first person to hit this. The problem seems to have existed since CS6 was released in 2016. None of the solutions was working for me, and&#8202;&mdash;&#8202;inspired by Sara Mauskopf&rsquo;s <a href=\"https:\/\/medium.com\/startup-grind\/how-to-start-a-company-with-no-free-time-b70fbe7b918a#.uujdblxc6\">excellent post<\/a>&#8202;&mdash;&#8202;I was rapidly running out of the time bounds for the project. Enough; I&rsquo;d just DTrace it.<\/p><p>[&#8230;]<\/p><p>Looking through <code>\/usr\/include\/sys\/resource.h<\/code> we can see that 1008 corresponds to the number of files (<code>RLIMIT_NOFILE | _RLIMIT_POSIX_FLAG<\/code>). Illustrator is trying to set that value to 0x7fffffffffffffff or 2&#8310;&#179;-1. Apparently too big; I filed any latent curiosity for another day.<\/p><p>[&#8230;]<\/p><p>First I used DTrace to find the code that was calling <code>setrlimit(2)<\/code>: using some knowledge of the x86 ISA\/ABI[&#8230;]<\/p><p>[&#8230;]<\/p><p>Instead I used <code>lldb<\/code> to replace the call with a store of 0 to <code>%eax<\/code> (to evince a successful return value) and some <code>nops<\/code> as padding[&#8230;]<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Adam Leventhal: I&rsquo;m not the first person to hit this. The problem seems to have existed since CS6 was released in 2016. None of the solutions was working for me, and&#8202;&mdash;&#8202;inspired by Sara Mauskopf&rsquo;s excellent post&#8202;&mdash;&#8202;I was rapidly running out of the time bounds for the project. Enough; I&rsquo;d just DTrace it.[&#8230;]Looking through \/usr\/include\/sys\/resource.h we [&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":[2],"tags":[961,770,323,317,30,1381,1235],"class_list":["post-16678","post","type-post","status-publish","format-standard","hentry","category-technology","tag-adobe-illustrator","tag-assembly-language","tag-dtrace","tag-lldb","tag-mac","tag-macos-10-12","tag-system-integrity-protection"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16678","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=16678"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16678\/revisions"}],"predecessor-version":[{"id":16679,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16678\/revisions\/16679"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=16678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=16678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=16678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}