fix run-program misaligned access
authorAnton Kovalenko <anton@sw4me.com>
Fri, 30 Sep 2011 10:06:04 +0000 (14:06 +0400)
committerDavid Lichteblau <david@lichteblau.com>
Fri, 30 Sep 2011 10:36:20 +0000 (12:36 +0200)
Thanks to Antoni Grzymala for the report.

src/code/run-program.lisp

index daebefe..0417401 100644 (file)
@@ -496,7 +496,7 @@ status slot."
         ;; Copy string.
         (sb-kernel:copy-ub8-to-system-area octets 0 string-sap 0 size)
         ;; NULL-terminate it
-        (setf (sap-ref-32 string-sap size) 0)
+        (sb-kernel:system-area-ub8-fill 0 string-sap size 4)
         ;; Put the pointer in the vector.
         (setf (sap-ref-sap vec-sap vec-index-offset) string-sap)
         ;; Advance string-sap for the next string.