10 July 2008

LilyPond Bug...Crushed!!!

I never thought I would *stumble* upon a bug in LilyPond, but I did. It was an outstanding bug that's been around for 1 1/2 years, and I believe that the default LilyPond build runs quite a bit faster now that the bug has been fixed. As I said, I discovered the *typo* by accident. When I was compiling LilyPond's documentation from scratch a few days ago, a compile-time error was preventing me from completing the build. It's strange though, because when I redirected stdout and stderr to a file, like so: $ make web > lily-makeweb.log 2>&1 the build successfully completed! After inspecting the log file, I noticed these *bogus* "programming errors" appearing at the spot where the build usually failed. I grepped the phrase in the source code, which took me to lily/include/smobs.hh. It turns out that this programming error was only supposed to appear when building an unoptimized, debugging build of LilyPond (which is not the default). But there was a typo in the #ifndef test (it checked for NDEDUG instead of NDEBUG), so the subroutine to check for these "programming errors" was being included in the binary no matter the configuration. Anyway, nobody else has mentioned a speed increase yet, so maybe it's just relevant to my setup. But it's exciting. I hope you enjoyed my convoluted bug-crushing story that involved changing one letter in an identifier name in a preprocessor conditional construct. :-)

2 comments:

Anonymous said...

Way to squash that SON OF A BITCH bug! Celebrate by doing lines of cocaine off the ass of a tranny prostitute. That will blow (no pun intended) your mind!

Anonymous said...
This comment has been removed by a blog administrator.