<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>mikeash.com pyblog/objc_msgsends-new-prototype.html comments</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>mikeash.com Recent Comments</description><lastBuildDate>Mon, 09 Nov 2026 19:59:09 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>projector rental Los Angeles - 2022-05-07 12:28:48</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>The information you have posted is very useful. The sites you have referred was good. Thanks for sharing..</description><guid isPermaLink="true">76bb3686b767d6a89cc8729237320b25</guid><pubDate>Sat, 07 May 2022 12:28:48 GMT</pubDate></item><item><title>renovation-appartement-paris.net/ - 2022-05-04 03:08:08</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Apartment Renovation Paris Express is the company for you. Whether it is the renovation of your kitchen, bedroom, bathroom, living room or any other room, our company has all the necessary expertise for an impeccable renovation of your home from A to Z.</description><guid isPermaLink="true">b3bd997128d2f7b4801dd8ae8b1723e5</guid><pubDate>Wed, 04 May 2022 03:08:08 GMT</pubDate></item><item><title>voyance-villeurbanne.fr - 2022-05-04 03:05:43</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Monique and her advisers each have an exceptional gift, coming from age-old esoteric knowledge. Our predictions are precise and dated.</description><guid isPermaLink="true">20395007a05ecb64e61b5fb8605082b7</guid><pubDate>Wed, 04 May 2022 03:05:43 GMT</pubDate></item><item><title>filtre à eau - 2022-05-04 03:01:03</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>A real water dynamizer is a device that aims to modify the structure of water in order to make it beneficial in its composition as well as in its molecular structure.</description><guid isPermaLink="true">e757b98a3ee27a2a4200e098966ac961</guid><pubDate>Wed, 04 May 2022 03:01:03 GMT</pubDate></item><item><title>septic installation - 2022-01-28 02:05:34</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Highly interesting discussions in this site. Looking forward to more of it. Kudos! top septic pumping company in Kansas City</description><guid isPermaLink="true">b7df68e23289743ab092bba7b2b479c3</guid><pubDate>Fri, 28 Jan 2022 02:05:34 GMT</pubDate></item><item><title>Junk removal mesquite TX - 2022-01-24 08:37:24</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>This is a very informative post and website all in all. junkremovalmesquitetx.com/services/commercial-junk-removal.html</description><guid isPermaLink="true">0f4a98b999c121c4f7d892a62589a321</guid><pubDate>Mon, 24 Jan 2022 08:37:24 GMT</pubDate></item><item><title>sd moto repair - 2022-01-08 07:12:34</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Hello… Interesting blog, this blog is very nice and good knowledge. 
&lt;br /&gt;</description><guid isPermaLink="true">369a9a36739eeaf3a022cfce43ef2978</guid><pubDate>Sat, 08 Jan 2022 07:12:34 GMT</pubDate></item><item><title>Drywall Repair in Billings, MT - 2022-01-07 15:03:30</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>This is a very interesting site. Looking forward for more in the future! drywallrepairbillingsmt.com/services/commercial-drywall.html</description><guid isPermaLink="true">8f1e9ce4cd88d23f333b9aed6d056b54</guid><pubDate>Fri, 07 Jan 2022 15:03:30 GMT</pubDate></item><item><title>Blurk - 2021-12-22 05:24:47</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>I have very belatedly encountered this issue in objc_msgSendSuper as used in the old version of the VSTGUI library that my colleague and I haven't touched for years (hint / sidetrack / rant: I don't recommend that library).
&lt;br /&gt;
&lt;br /&gt;This post has just saved my butt, and I can now make a native M1 / Apple Silicon / ARM64 build of our Audio Unit plugins without having to update our copy of VSTGUI and thus have to fix hundreds of compiler errors since the authors of that lib don't believe in API stability within a major version (whoops, side-rant again).
&lt;br /&gt;
&lt;br /&gt;Thank you very much.</description><guid isPermaLink="true">c2c068dfdd51143295caa9262f785d3f</guid><pubDate>Wed, 22 Dec 2021 05:24:47 GMT</pubDate></item><item><title>Civil - 2021-12-13 12:48:20</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Very good write up, will definitely reda more of your post. Best TV installer in Glendale, CA -&amp;gt; tvinstallerglendaleca.com/services/commercial-tv-installation.html</description><guid isPermaLink="true">c7cae26ae9b88eda6e2330c1be2d6ba9</guid><pubDate>Mon, 13 Dec 2021 12:48:20 GMT</pubDate></item><item><title>construction site cleanup companies near me - 2021-11-29 10:11:14</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Very good code, learned a lot from reading your blogs.
&lt;br /&gt;
&lt;br /&gt;- junkremovalstamfordct.com/services/construction-cleanup.html</description><guid isPermaLink="true">35f749fc87657b755d444a62867c6fb0</guid><pubDate>Mon, 29 Nov 2021 10:11:14 GMT</pubDate></item><item><title>Alice - 2021-11-17 13:56:26</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Grea site! Keep on sharing posts like this. Visit our site also ---&amp;gt; poolservicemiamigardensfl.com</description><guid isPermaLink="true">3a9216400de0a6c4e2c5ef5089b07db2</guid><pubDate>Wed, 17 Nov 2021 13:56:26 GMT</pubDate></item><item><title>housekeeping - 2021-11-12 10:42:16</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Thanks for sharing this amazing site. Keep posting!
&lt;br /&gt;
&lt;br /&gt;</description><guid isPermaLink="true">a438ff5bd9cd067597a3f4a13d88e9fe</guid><pubDate>Fri, 12 Nov 2021 10:42:16 GMT</pubDate></item><item><title>smart jail mail - 2021-07-07 21:22:49</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>amazing prototype! very well done!
&lt;br /&gt;</description><guid isPermaLink="true">6b75c4738118a9dbc881fc6a425d4f4a</guid><pubDate>Wed, 07 Jul 2021 21:22:49 GMT</pubDate></item><item><title>dciplanosmobilemechanic.com/ - 2021-06-27 09:22:08</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>amazing prototype! very well done!</description><guid isPermaLink="true">74afaf31c036896e04ca89c71ec4bd40</guid><pubDate>Sun, 27 Jun 2021 09:22:08 GMT</pubDate></item><item><title> go here  - 2021-06-09 09:48:08</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Nice prototype! Keep posted. Thanks  </description><guid isPermaLink="true">5d6a50a678a8f892bed3082344dfe719</guid><pubDate>Wed, 09 Jun 2021 09:48:08 GMT</pubDate></item><item><title>Plumbing Sherwood Park - 2021-05-13 21:54:03</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Great job! you guys are making huge progress, keep it up! I look forward to reading your work in the future.
&lt;br /&gt;
&lt;br /&gt;</description><guid isPermaLink="true">ba0618a64b5d2e1da3600941614bafd3</guid><pubDate>Thu, 13 May 2021 21:54:03 GMT</pubDate></item><item><title>Element - 2021-04-29 20:17:04</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Thanks for sharing your website, will definitely be reading/watching/learning from it.
&lt;br /&gt;
&lt;br /&gt;</description><guid isPermaLink="true">cc28078ac40bcaeef38849ed7b6a2286</guid><pubDate>Thu, 29 Apr 2021 20:17:04 GMT</pubDate></item><item><title>Physiotherapy In Sherwood Park - 2021-04-16 20:45:58</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Your site has a lot of useful information for me, I visit it very often. Keep it up!
&lt;br /&gt;
&lt;br /&gt;&amp;nbsp;</description><guid isPermaLink="true">73521c7c6b5b4c8ecffadbbd9dd2d58d</guid><pubDate>Fri, 16 Apr 2021 20:45:58 GMT</pubDate></item><item><title>Gregory Davis - 2020-03-31 19:45:53</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Hello Mike. Sorry for hijacking this thread, but I don't know  who else to ask - nobody but rare few are interested in macOS these days :( Do you have time to write a post about SwiftUI, its relationship with AppKit/Cocoa, and if this the future of macOS development? Is it worth investing time into? Thank you for all your hard work.</description><guid isPermaLink="true">71a750ea08b9d09acc069d44c06447c9</guid><pubDate>Tue, 31 Mar 2020 19:45:53 GMT</pubDate></item><item><title>mikeash - 2020-02-14 03:42:29</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>With the old prototype, if you called it without casting it, you left yourself open to the sort of bugs I discuss here. On x86-64, you were mostly fine, as long as you got the types right and didn't use floats. On ARM64, the parameters wouldn't come through at all. Thankfully, it's the sort of problem that happens every call, so it's probably not something that would slip through your testing and start crashing out in the field.</description><guid isPermaLink="true">d4cbfb61169a70142859f7127511a72a</guid><pubDate>Fri, 14 Feb 2020 03:42:29 GMT</pubDate></item><item><title>Pierre Lebeaupin - 2019-10-16 14:37:21</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>For instance, programs that incorrectly casted objc_msgSend before using it had a harder time with the Intel transition: I seem to remember a wide-eyed blog post (wasn't it from one of the Unsanity devs?) reading pretty much like "we were casting the return value of objc_msgSend, but turns out, this isn't sufficient, neither is it sufficient to cast all the parameters as well: it is somehow necessary to cast the objc_msgSend function pointer itself, and call through the resultant cast!"
&lt;br /&gt;
&lt;br /&gt;Since then, I have considered objc_msgSend (and friends) as something akin to dyld_stub_binding_helper (except higher level and more dynamic, e.g. it is called each time instead of just once per symbol): an address to jump to, as a substitute to a static address for the function entry point, everything else about the function call being otherwise equal; the code at the address in question being obviously responsible for binding to the actual implementation. The new prototype better reflects that. I don't think it's possible to have a C type for which no value can possibly be provided*; this is too bad, as having the objc_msgSend prototype require such a type would even better reflect this reality.
&lt;br /&gt;
&lt;br /&gt;Anyway, congratulations on picking up the Objective-C runtime esoterica public communication role from Greg Parker!
&lt;br /&gt;
&lt;br /&gt;*I am sure GNU C has an extension for that.</description><guid isPermaLink="true">10e1f621c42e65461c0d78e9eb23e7dc</guid><pubDate>Wed, 16 Oct 2019 14:37:21 GMT</pubDate></item><item><title>Jean-Daniel - 2019-10-13 15:33:20</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>And by the way, casting objc_msgSend may not be enough. For some types of arguments, it may still fails at runtime, that's why there is some variants like objc_msgSend_stret, objc_msgSend_fpret, objc_msgSend_fp2ret, …
&lt;br /&gt;
&lt;br /&gt;As long as you use basic types, it should be fine, but when you start using structs, long double and complex you need to be careful to use the right variant.
&lt;br /&gt;</description><guid isPermaLink="true">0d1e37db4d1eece3e98347f252c4c854</guid><pubDate>Sun, 13 Oct 2019 15:33:20 GMT</pubDate></item><item><title>Jean-Daniel - 2019-10-13 14:47:51</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>@ZetaSQ: Bugs exist since the first runtime version, but only for people trying to use objc_msgSend directly without knowing how to use it properly.
&lt;br /&gt;
&lt;br /&gt;For calls generated by the compiler, it has never been an issue.</description><guid isPermaLink="true">965be6b1661be3a71adea3d3c723e9d1</guid><pubDate>Sun, 13 Oct 2019 14:47:51 GMT</pubDate></item><item><title>ZetaSQ - 2019-10-13 08:09:42</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>If the previous version of the objc_msgSend's signature has ABI mismatch problem, does this mean actual bugs (like garbage data you mentioned) have been existing in previous iOS/macOS versions ? Or do the compilers from previous OSs have been using other techniques to circumvent this issue?</description><guid isPermaLink="true">55151f824037d5b5609f380c9b68f5bd</guid><pubDate>Sun, 13 Oct 2019 08:09:42 GMT</pubDate></item><item><title>Jean-Daniel - 2019-10-12 11:25:14</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>@Ahmad Alhashemi: You don't have to call it though function pointer.
&lt;br /&gt;
&lt;br /&gt;You can cast it directly at call site.
&lt;br /&gt;
&lt;br /&gt;&lt;code&gt;((id (*)(id, SEL, id)) objc_msgSend)(obj, sel, arg);&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;which still generates a direct function call:
&lt;br /&gt;
&lt;br /&gt;&lt;code&gt;callq&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_objc_msgSend&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;</description><guid isPermaLink="true">c7c4546d6194282ac8f7a80dfb6d5bcc</guid><pubDate>Sat, 12 Oct 2019 11:25:14 GMT</pubDate></item><item><title>Ahmad Alhashemi - 2019-10-12 04:51:56</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Besides being necessary now, does calling objc_msgSend through a function pointer affect the way the code gets compiled down to machine code? Is function pointer overhead relevant here?</description><guid isPermaLink="true">74aedf7aa292e896772f733639e91afc</guid><pubDate>Sat, 12 Oct 2019 04:51:56 GMT</pubDate></item><item><title>mikeash - 2019-10-11 18:38:54</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>It’s been an option for a long time and you could set it in Xcode. Might have been on by default in some cases. Now it’s set that way in the header and the docs reflect it.</description><guid isPermaLink="true">68d8957a69634cfb70251c632cc41132</guid><pubDate>Fri, 11 Oct 2019 18:38:54 GMT</pubDate></item><item><title>Leo - 2019-10-11 17:49:53</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>Hi Mike,
&lt;br /&gt;
&lt;br /&gt;Was this change not made years ago, when 64-bit ARM was introduced?
&lt;br /&gt;
&lt;br /&gt;Thanks</description><guid isPermaLink="true">054a65630de63674cdf6b1af666d6c99</guid><pubDate>Fri, 11 Oct 2019 17:49:53 GMT</pubDate></item><item><title>Daniel Jalkut - 2019-10-11 16:44:16</title><link>http://www.mikeash.com/?page=pyblog/objc_msgsends-new-prototype.html#comments</link><description>For folks looking for a concrete example of how you might achieve Mike's recommendation to cast objc_msgSend and "get the types right", I wrote up a post that culminates in such an example: &lt;a href="https://indiestack.com/2019/10/casting-objective-c-message-sends/"&gt;https://indiestack.com/2019/10/casting-objective-c-message-sends/&lt;/a&gt;</description><guid isPermaLink="true">a64016f0659ac1c57ceca56259000a51</guid><pubDate>Fri, 11 Oct 2019 16:44:16 GMT</pubDate></item></channel></rss>
