# Lockless lazily-initialized static/global variables

So we all know (or we should) about the potential perils of double-checked locking. These can be mostly mitigated by judicious use of the volatile keyword, at least in languages which support it, but in this wonderful world of multi-core and multi-processor development, there are still some problems[PDF] to be aware of (there’s optimizing-compiler theory in there; if that scares you, just take my word that it’s got problems).

# symbolicatecrash can kiss my arse

So I just spent all this evening debugging the fixed version of symbolicatecrash, attempting to see why it wasn’t working for me. I found a few bugs, fixed them (eventually—Perl is a language I’ve not used extensively, and not at all for about 10 years). Here I’ll go through what I had to change & why.

So I’m debugging stuff & I get this weird-looking warning:

# Apple Binary Protection Tool

This is a slightly-tweaked version of some code by Google’s Amit Singh. I’ve juggled things a little and added support for scanning through fat binaries encrypting all valid architectures in a single pass. It will automatically detect whether it’s currently encrypted or decrypted, and will apply or remove encryption as appropriate.

# AQXMLParser Test Redux

I added NSXMLDocument to the XML parser test code and refactored it to only run a single user-selected test each time. When doing this, NSXMLParser used the same amount of memory whether using memory-mapped data or not. Here are the new output values:

# AQXMLParser == Big Memory Win

I just wrote an AQXMLParser test project, along with a Ruby script which generated a 22MB XML file looking kinda like this:

# Xcode BSD License Comment Script

When I first started using custom header comments containing different licenses, I was using Epsilon, where I had a custom EEL script, user variables, & a keyboard shortcut to insert a header block with the appropriate Creative Commons license. Now, however, I find myself using Xcode most often, so I needed something there to save me from forever copying & editing one chunk of BSD-license header comment.