[slime-devel] Segmentation Fault with Slime, Uffi and CMUCL

Stefan Kamphausen skampi at gmx.net
Wed Sep 14 14:48:45 UTC 2005


Dear Slime-Developers,

in a project that involves heavy usage of UFFI (loading a library
written in C++ with a C-header file using extern "C") I am
encountering repeatable segmentation faults when working under SLIME.

An example session would be:
--------------------------------------------------
M-x slime
,load-system cl-the-uffi-using-system
  (using tab completion and a symlink in my central registry)
,cd /path/to/another/lib/im/currently/workin/on

and the echo area tells me:
Lisp connection closed unexpectedly: exited abnormally with code 256
--------------------------------------------------

The debugger output I get after C-g'ing is pasted below

A few more notes:
* I am using CVS HEAD slime, XEmacs 21.4 (patch 17) and CMU Common
  Lisp CVS 19b 19b-release-20050628-3 + minimal debian patches (19B)
  on Gentoo/x86.  SLIME ist not emerged but manually kept in sync with
  CVS.
* I can't tell for sure that there are no problems with the C-lib.  
  But I'd expect those problems to show up when calling the functions
  not after loading the system and doing a simple directory change.
* I have double checked the UFFI-function definitions and the C-header
  file.  That should be correct.
* Currently I can't change the C-library at all, but when the author
  will be back from his holiday we can change everything there.
* Unfortunately I can't provide the source, it's an inhouse project of
  my employer (although we released one part of it under BSD license
  recently :-).
* I can't crash it easily with SBCL 0.9.4.
* And, well, it works when running CMUCL from the shell.  That's why I
  am writing to this list in hope of some enlightenment.


Of course I'd be happy if you'd say: "ah, this is a bug, I just
uploaded a patch", but any pointer as to where and how I might get
more information will be appreciated.


Kind Regards
Stefan Kamphausen

PS: Funny enough, I had some problems sending to this list due to
greylisting and just at that moment martin wrote his somewhat similar
message.

----------------------------------------------------------------------
Debugger output:
Debugger entered--Lisp error: (quit)
  accept-process-output(nil 0 10000)
  (while t (accept-process-output nil 0 10000))
  (let ((debug-on-quit t) (inhibit-quit nil)) (while t
(accept-process-output nil 0 10000)))
  (catch tag (slime-rex (tag sexp) (sexp package) ((:ok value) (unless
(member tag slime-stack-eval-tags) (error "tag = %S eval-tags = %S sexp =
%S" tag slime-stack-eval-tags sexp)) (throw tag (list (function identity)
value))) ((:abort) (throw tag (list (function error) "Synchronous Lisp
Evaluation aborted.")))) (let ((debug-on-quit t) (inhibit-quit nil)) (while
t (accept-process-output nil 0 10000))))
  (apply (function funcall) (catch tag (slime-rex (tag sexp) (sexp package)
((:ok value) (unless (member tag slime-stack-eval-tags) (error "tag = %S
eval-tags = %S sexp = %S" tag slime-stack-eval-tags sexp)) (throw tag (list
(function identity) value))) ((:abort) (throw tag (list (function error)
"Synchronous Lisp Evaluation aborted.")))) (let ((debug-on-quit t)
(inhibit-quit nil)) (while t (accept-process-output nil 0 10000)))))
  (let* ((tag (gensym "slime-result-")) (slime-stack-eval-tags (cons tag
slime-stack-eval-tags))) (apply (function funcall) (catch tag (slime-rex
(tag sexp) (sexp package) ((:ok value) (unless (member tag
slime-stack-eval-tags) (error "tag = %S eval-tags = %S sexp = %S" tag
slime-stack-eval-tags sexp)) (throw tag (list (function identity) value)))
((:abort) (throw tag (list (function error) "Synchronous Lisp Evaluation
aborted.")))) (let ((debug-on-quit t) (inhibit-quit nil)) (while t
(accept-process-output nil 0 10000))))))
  slime-eval((swank:set-default-directory
"/home/ska/prj/lisp/cl-meta-worker/"))
  (slime-from-lisp-filename (slime-eval (backquote
(swank:set-default-directory (\, (slime-to-lisp-filename directory))))))
  (message "default-directory: %s" (slime-from-lisp-filename (slime-eval
(backquote (swank:set-default-directory (\, (slime-to-lisp-filename
directory)))))))
  (lambda (directory) "Make DIRECTORY become Lisp's current directory."
(interactive (list (read-directory-name "Directory: " nil nil t))) (message
"default-directory: %s" (slime-from-lisp-filename (slime-eval (backquote
(swank:set-default-directory (\, (slime-to-lisp-filename directory)))))))
(with-current-buffer (slime-output-buffer) (setq default-directory
(expand-file-name directory)) (when (boundp (quote header-line-format))
(slime-repl-update-banner))))("~/prj/lisp/cl-meta-worker/")
  call-interactively(slime-set-default-directory)
  (let ((shortcut (slime-lookup-shortcut (completing-read "Command: "
(slime-bogus-completion-alist (slime-list-all-repl-shortcuts)) nil t nil
(quote slime-repl-shortcut-history))))) (call-interactively
(slime-repl-shortcut\.handler shortcut)))
  (if (save-excursion (goto-char slime-repl-input-start-mark) (looking-at "
*$")) (let ((shortcut (slime-lookup-shortcut (completing-read "Command: "
(slime-bogus-completion-alist (slime-list-all-repl-shortcuts)) nil t nil
(quote slime-repl-shortcut-history))))) (call-interactively
(slime-repl-shortcut\.handler shortcut))) (insert (string
slime-repl-shortcut-dispatch-char)))
  (lambda nil (interactive) (if (save-excursion (goto-char
slime-repl-input-start-mark) (looking-at " *$")) (let ((shortcut
(slime-lookup-shortcut (completing-read "Command: "
(slime-bogus-completion-alist (slime-list-all-repl-shortcuts)) nil t nil
(quote slime-repl-shortcut-history))))) (call-interactively
(slime-repl-shortcut\.handler shortcut))) (insert (string
slime-repl-shortcut-dispatch-char))))()
  call-interactively(slime-handle-repl-shortcut)

-- 
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.

5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++



More information about the slime-devel mailing list