Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
f62f1e9e by Raymond Toy at 2022-08-14T08:09:53-07:00
Fix some typos.
One was mentioned in !87. Found a few more typos so fixed those too.
- - - - -
1 changed file:
- src/general-info/release-21e.md
Changes:
=====================================
src/general-info/release-21e.md
=====================================
@@ -1,10 +1,10 @@
# CMUCL 21e
-## Work in prograss
+## Work in progress
The CMUCL project is pleased to announce the release of CMUCL 21e.
This is a major release which contains numerous enhancements and bug
-fixes from the 21a release.
+fixes from the 21d release.
CMUCL is a free, high performance implementation of the Common Lisp
programming language which runs on most major Unix platforms. It
@@ -39,15 +39,15 @@ public domain.
* ~~#90~~ Some static symbols have been removed. This probably makes the fasl files incompatible with older versions.
* ~~#91~~ Loop destructuring no longer incorrectly signals an error
* ~~#95~~ Disassembler syntax of x86 je and movzx is incorrect
- * ~~#97~~ Define and use ud2 instruction isntead of int3. Fixes single-stepping.
+ * ~~#97~~ Define and use ud2 instruction instead of int3. Fixes single-stepping.
* ~~#98~~ fstpd is not an Intel instruction; disassemble as `fstp dword ptr [addr]`
- * ~~#100~~ ldb prints out unicode base-chars correctly instead of just the low 8 bits.
+ * ~~#100~~ ldb prints out Unicode base-chars correctly instead of just the low 8 bits.
* ~~#103~~ RANDOM-MT19937-UPDATE assembly routine still exists
* ~~#104~~ Single-stepping broken (fixed via #97).
* ~~#107~~ Replace u_int8_t with uint8_t
* ~~#108~~ Update ASDF
* ~~#112~~ CLX can't connect to X server via inet sockets
- * ~~#113~~ REQUIRE on contribs can pull in the wrong things vai ASDF.
+ * ~~#113~~ REQUIRE on contribs can pull in the wrong things via ASDF.
* ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
* ~~#122~~ gcc 11 can't build cmucl
* ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/f62f1e9ee9835281ee42b6f…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/f62f1e9ee9835281ee42b6f…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
9cf3916e by Raymond Toy at 2022-08-14T15:00:30+00:00
Fix #128: quit accepts an exit code
- - - - -
3aec3f5e by Raymond Toy at 2022-08-14T15:00:31+00:00
Merge branch 'issue-128-quit-exit-code' into 'master'
Fix #128: quit accepts an exit code
Closes #128
See merge request cmucl/cmucl!87
- - - - -
3 changed files:
- src/code/lispinit.lisp
- src/general-info/release-21e.md
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/code/lispinit.lisp
=====================================
@@ -492,14 +492,15 @@
;;; Quit gets us out, one way or another.
-(defun quit (&optional recklessly-p)
- "Terminates the current Lisp. Things are cleaned up unless Recklessly-P is
- non-Nil."
+(defun quit (&optional recklessly-p (code 0))
+ "Terminates the current Lisp. Things are cleaned up unless
+ Recklessly-P is non-Nil. On quitting, Lisp sets the return code to
+ Code, defaulting to 0."
(if recklessly-p
- (unix:unix-exit 0)
+ (unix:unix-exit code)
(progn
(mapc (lambda (fn) (ignore-errors (funcall fn))) *cleanup-functions*)
- (throw '%end-of-the-world 0))))
+ (throw '%end-of-the-world code))))
#-mp ; Multi-processing version defined in multi-proc.lisp.
=====================================
src/general-info/release-21e.md
=====================================
@@ -51,6 +51,7 @@ public domain.
* ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
* ~~#122~~ gcc 11 can't build cmucl
* ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
+ * ~~#128~~ `QUIT` accepts an exit code
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -309,8 +309,9 @@ msgstr ""
#: src/code/lispinit.lisp
msgid ""
-"Terminates the current Lisp. Things are cleaned up unless Recklessly-P is\n"
-" non-Nil."
+"Terminates the current Lisp. Things are cleaned up unless\n"
+" Recklessly-P is non-Nil. On quitting, Lisp sets the return code to\n"
+" Code, defaulting to 0."
msgstr ""
#: src/code/lispinit.lisp
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/88ca0184f219100c92888c…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/88ca0184f219100c92888c…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-128-quit-exit-code at cmucl / cmucl
Commits:
bfdd1d8c by Raymond Toy at 2022-08-13T17:20:01-07:00
Rename exit-code to code.
Carl, offline, suggested renaming exit-code to just code.
The docstring is also updated, along with the pot file because the
docstring changed.
Update the release notes as well.
- - - - -
3 changed files:
- src/code/lispinit.lisp
- src/general-info/release-21e.md
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/code/lispinit.lisp
=====================================
@@ -492,15 +492,15 @@
;;; Quit gets us out, one way or another.
-(defun quit (&optional recklessly-p (exit-code 0))
+(defun quit (&optional recklessly-p (code 0))
"Terminates the current Lisp. Things are cleaned up unless
Recklessly-P is non-Nil. On quitting, Lisp sets the return code to
- exit-code, defaulting to 0."
+ Code, defaulting to 0."
(if recklessly-p
- (unix:unix-exit exit-code)
+ (unix:unix-exit code)
(progn
(mapc (lambda (fn) (ignore-errors (funcall fn))) *cleanup-functions*)
- (throw '%end-of-the-world exit-code))))
+ (throw '%end-of-the-world code))))
#-mp ; Multi-processing version defined in multi-proc.lisp.
=====================================
src/general-info/release-21e.md
=====================================
@@ -51,6 +51,7 @@ public domain.
* ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
* ~~#122~~ gcc 11 can't build cmucl
* ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
+ * ~~#128~~ `QUIT` accepts an exit code
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -311,7 +311,7 @@ msgstr ""
msgid ""
"Terminates the current Lisp. Things are cleaned up unless\n"
" Recklessly-P is non-Nil. On quitting, Lisp sets the return code to\n"
-" exit-code, defaulting to 0."
+" Code, defaulting to 0."
msgstr ""
#: src/code/lispinit.lisp
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/bfdd1d8c039f13caf593472…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/bfdd1d8c039f13caf593472…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
88ca0184 by Raymond Toy at 2022-08-08T10:44:47-07:00
Update release notes
We've fixed bugs #122 and #127 now, so make a note of it.
- - - - -
1 changed file:
- src/general-info/release-21e.md
Changes:
=====================================
src/general-info/release-21e.md
=====================================
@@ -49,6 +49,8 @@ public domain.
* ~~#112~~ CLX can't connect to X server via inet sockets
* ~~#113~~ REQUIRE on contribs can pull in the wrong things vai ASDF.
* ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
+ * ~~#122~~ gcc 11 can't build cmucl
+ * ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/88ca0184f219100c92888cf…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/88ca0184f219100c92888cf…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
1af344b3 by Raymond Toy at 2022-08-08T17:39:43+00:00
Fix #127: Linux unix:unix-getpwuid segfaults with invalid uid
- - - - -
9bba5bc4 by Raymond Toy at 2022-08-08T17:39:45+00:00
Merge branch 'issue-127-getpwuid-segfault' into 'master'
Fix #127: Linux unix:unix-getpwuid segfaults with invalid uid
Closes #127
See merge request cmucl/cmucl!86
- - - - -
2 changed files:
- src/code/unix.lisp
- tests/issues.lisp
Changes:
=====================================
src/code/unix.lisp
=====================================
@@ -2748,9 +2748,12 @@
#+linux
(defun unix-getpwuid (uid)
- _N"Return a USER-INFO structure for the user identified by UID, or NIL if not found."
+ "Return a USER-INFO structure for the user identified by UID. If
+ not found, NIL is returned with a second value indicating the cause
+ of the failure. In particular, if the second value is 0 (or
+ ENONENT, ESRCH, EBADF, etc.), then the uid was not found."
(declare (type unix-uid uid))
- (with-alien ((buf (array c-call:char 1024))
+ (with-alien ((buf (array c-call:char 16384))
(user-info (struct passwd))
(result (* (struct passwd))))
(let ((returned
@@ -2767,15 +2770,16 @@
(cast buf (* c-call:char))
1024
(addr result))))
- (when (zerop returned)
- (make-user-info
- :name (string (cast (slot result 'pw-name) c-call:c-string))
- :password (string (cast (slot result 'pw-passwd) c-call:c-string))
- :uid (slot result 'pw-uid)
- :gid (slot result 'pw-gid)
- :gecos (string (cast (slot result 'pw-gecos) c-call:c-string))
- :dir (string (cast (slot result 'pw-dir) c-call:c-string))
- :shell (string (cast (slot result 'pw-shell) c-call:c-string)))))))
+ (if (not (zerop (sap-int (alien-sap result))))
+ (make-user-info
+ :name (string (cast (slot result 'pw-name) c-call:c-string))
+ :password (string (cast (slot result 'pw-passwd) c-call:c-string))
+ :uid (slot result 'pw-uid)
+ :gid (slot result 'pw-gid)
+ :gecos (string (cast (slot result 'pw-gecos) c-call:c-string))
+ :dir (string (cast (slot result 'pw-dir) c-call:c-string))
+ :shell (string (cast (slot result 'pw-shell) c-call:c-string)))
+ (values nil returned)))))
;;; Getrusage is not provided in the C library on Solaris 2.4, and is
;;; rather slow on later versions so the "times" system call is
=====================================
tests/issues.lisp
=====================================
@@ -570,3 +570,12 @@
(terpri s)
(fresh-line s))
a)))
+
+(define-test issue.127
+ (:tag :issues)
+ ;; Let's just start at uid 10000 and keep going up until we fail.
+ ;; There should be no segfaults when we find an invalid uid.
+ (loop for uid from 10000
+ with user-info = (unix:unix-getpwuid uid)
+ while user-info
+ finally (assert-false user-info)))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/00907500388dcbabd11306…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/00907500388dcbabd11306…
You're receiving this email because of your account on gitlab.common-lisp.net.