Jacob Bartlett

@JacobBartlett
53 Followers
264 Following
825 Posts

Writing the #1 iOS newsletter on Substack. Turbocharge your Swift career with in-depth weekly articles 🚀 Sign up free today!

https://join.jacobstechtavern.com

My life was a lie. It turns out the shiny new Mutex was just syntax sugar on `os_unfair_lock` all along đź‘»

Read my full article to see how performance of this Mutex in the Synchronisation framework compares against Swift actors: https://blog.jacobstechtavern.com/p/the-synchronisation-framework

in Swift Concurrency. With my full focus this week, I'm aiming to get it out to my paid subs by Tuesday 11.

Support my journey to independence by subscribing for free: https://join.jacobstechtavern.com

Jacob's Tech Tavern

Sign up free

Jacob's Tech Tavern

vis-a-vis sponsorship has reduced the intensity with which I'm going to try and muck around with LeetCode. Depends on my runway though.

Spent the last part of the day planning out my “Swift Concurrency Kata” which is going to join in with my concurrency course as a new pillar in why someone should become a paid subscriber. Think like a game where each level is an increasingly difficult puzzle that you have to solve with a different tool, or combination of tools,

This dramatically improves the ergonomics, but I had to re-write my whole f*cking project.

Got it out in time. Managed to get some people to proofread my stuff. Thanks a ton to to Alex Bush and Pierluigi Cifani 🙏

I have an interview with a very legendary figure in the iOS community tomorrow, so I spent the rest of the day prepping the various questions I want to ask.

With the rest of the day, I actually managed to get a gym session in which is crazy. I think my potential positive avenues

Indie creator log day 13/100 (before my wife makes me get a real job)

ARR growth: +$636. I can proudly announce I have achieved minimum wage 🎉 If I can release a banger like this every week we might be getting somewhere.

Spent the day rushing to finish my Kotlin Multiplatform vs Swift for Android post. Fortunately/unfortunately, they team had just merged in a way to interop Async/Await with swift-java.

It's the "Xbox vs. Playstation" of the multiplatform era. Swift for Android has arisen to challenge the dominance of Kotlin Multiplatform.

The prize? The hearts and souls of native mobile engineers everywhere.

Be among the first to read my exclusive in-depth comparison: https://blog.jacobstechtavern.com/p/swift-for-android-vs-kmp

🚨 Your daily reminder to actually read the code generated by LLMs! 🚨

This was its solution to the “extensions must not contain stored properties” compiler error 🤪

If you like my posts, subscribe to get my work every week: https://join.jacobstechtavern.com

THE CRASH IS A LIE

An exceptional deep dive

Jacob’s Tech Tavern

Mach, the low-level microkernel that powers XNU. Mach manages virtual memory, inter-process communication, thread scheduling, and exception handling.

This high-level exception takes the form of a SIGSEV POSIX signal — a notification sent to the offending thread to kill its parent process. 
We can see this mapping from KERN_INVALID_ADDRESS to SIGSEV in xnu/bsd/uxkern/ux_exception.c:

SIGSEV is a segmentation fault, which is a fancy word for a dangerous memory access violation.  

How is a Crash implemented? Mach and POSIX Signals

The KERN_INVALID_ADDRESS return code indicates an unsafe memory access; outside the virtual address space of the process. This is a classic attack vector for Level 9 system compromise, so crashing really is the best outcome here. 

The virtual memory subsystem vm ultimately invokes the exception handling subsystem, which transforms the kernel exception into a higher-level exception that terminates the process.

These systems are all part of