1.0.47.1: fix longstanding bug in os_get_runtime_executable_path on darwin
authorCyrus Harmon <ch-sbcl@bobobeach.com>
Mon, 28 Mar 2011 02:42:09 +0000 (02:42 +0000)
committerCyrus Harmon <ch-sbcl@bobobeach.com>
Mon, 28 Mar 2011 02:42:09 +0000 (02:42 +0000)
commite05f13837227104f8fa3441ff1085982fab20e2c
tree4c0f0499b14b95e97f954c487d4cf18b77c20a92
parentabd7e18d16d967df350d206d81bb2835c0b96cc1
1.0.47.1: fix longstanding bug in os_get_runtime_executable_path on darwin

 * in os_get_runtime_executable_path, we were wrongly assuming that
   size would be set to the actual size of the string on a successful
   call to NSGetExecutablePath. This isn't the case and we were
   setting path[1025] = '\0'; causing things to break with XCode 4's
   CLANG compiler.

 * While we're at it, we should check to make that runtime_path is not
   NULL before we free it, as there is a code path where we might end
   up trying to free runtime_path when it was NULL but
   saved_runtime_path was non-NULL.
src/runtime/darwin-os.c
src/runtime/runtime.c
version.lisp-expr