Thursday, June 18, 2026

New Significant Fixes

The Crack main repository hasn't been very active for a while.  This has been primarily due to my involvement in other projects, a number of which make use of the language.  But the 1.7 release, specifically, has been blocked by one particular bug literally for several years -- I simply haven't had enough consecutive productive hours to focus on it.

But I'm happy to say that in the past two days I have fixed both that bug and another.  Both had extremely simple fixes, literally one or two lines of code.  Finding the problem, of course, is another matter.  The Crack executor is as magnificent a beast as has ever emerged from the twisted, steaming cauldron of my mind, and I'm sure it's been several years since I last engaged this beast beyond a superficial level.  So I feel rather proud that I'm still able to ferret out it's deepest imperfections when presented with a reproducible error case.

Both bugs were related to class instances -- constant, static, global structures that constitute Crack's RTTI mechanism.  

The older one ("older" as in "known longer") was a naming collision in Generic class instance global variables.  It results in a massive dump of the LLVM IR code for the program along with an assertion failure indicating an "uninitialized global" (without naming the global, of course).  This was caused by passing the current parser context to the function that generates the class instance for a new generic, which is meant to accept the context of the new generic class (more specific typing would have prevented this). 

I encountered the newer bug while trying to debug the older one.   It turns out that when you forward declare an appendage, the "appendage" flag of the reused TypeDef object created during processing of the forward declaration wasn't getting updated.

With these issues crushed, and a number of new features in the standard library, I now feel inspired to get to a 1.7 release.  There are still quite a few test failures that have crept in over the years to debug, but I don't expect they're anything major.  Time to move to the next milestone!