Opened 16 years ago

Closed 15 years ago

#2815 closed defect (fixed)

BUG: clisp port segfaults in some situations

Reported by: eric.jacoboni@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

clisp port segfaults in some situations where it should at least produce some error message instead of aborting:

[1]> (+ A 3)

* - EVAL: La variable A n'a pas de valeur.

* - * - * - * - Message inimprimable (... lot of this message) * - zsh: segmentation fault clisp %

This problem arise with or without Darwin variant, with the clisp 2.33.2_0 port.

On the same machine, the fink port of this same clisp version :

[1]> (+ A 3)

* - EVAL: La variable A n'a pas de valeur. Rentrées possibles: STORE-VALUE :R1 You may input a new value for A. USE-VALUE :R2 You may input a value to be used instead of A.

Break 1 [2]>

Change History (7)

comment:1 Changed 16 years ago by mww@…

Owner: changed from darwinports-bugs@… to gwright@…

assign to maintainer; to speed things up next time, please have a look at http://darwinports.opendarwin.org/docs/ch01s05.html#user_bugs

comment:2 Changed 16 years ago by eric.jacoboni@…

In fact, the clisp fink port seems to be ok with locales:

% clisp STACK depth: 16367 WARNING: locale: no encoding , using UTF-8

As i'm french, i use the fr_FR LANG environment. It seems it's the reason of the problem with the DP Clisp port which seems not be able to deal with french accents. Forcing US locale solve my problem.

% LANG=en_US /opt/local/bin/clisp [1]> (+ A 3)

* - EVAL: variable A has no value The following restarts are available: STORE-VALUE :R1 You may input a new value for A. USE-VALUE :R2 You may input a value to be used instead of A.

comment:3 Changed 16 years ago by gwright@…

Status: newassigned

This has happened before; I'll review what we did last time.

I do not think it is the fault of the clisp port itself; I think it is somehow being linked with the wrong library. Running otool -L on the clisp binary will tell what it is trying to link to.

/gw

comment:4 Changed 16 years ago by eric.jacoboni@…

In fact, clisp is linked only to a base lib :

% otool -L /opt/local/bin/clisp /opt/local/bin/clisp:

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.1)

exactly, no more, no less, as the clisp fink port. As i pointed it in my previous comment, locales seem ti be the culprit, maybe a configure option ?

comment:5 Changed 16 years ago by gwright@…

I have looked at this extensively today. Unfortunately, I don't have any good news. Even if I build using the same configuration options as the fink port of the same version, I still get a segfault when an exception occurs and LANG is set.

But it's worse: if I link with the "highly recommended" libsigsev, the build always fails with a bus error. Since there's no configuration option to prevent linking libsigsegv if it is on your system, for the moment libsigsegv conflicts with clisp.

This is somehow wrapped up with exception handling since I can run the whole build with LANG=fr_FR and all of the messages will be in french, and the build will successfully complete. But it will still segfault on Eric's example.

At the moment I have no idea why clisp builds (or at least built once upon a time) and handles exceptions properly under fink. My experience has been that the maintainers are not very responsive to problem reports on OS X.

I will have another look at this later this week. I still suspect a library issue, but note that clisp statically links a number of libraries. Any suggestions are welcomed.

/gw

comment:6 Changed 16 years ago by snu@…

Summary: clisp port segfaults in some situationsBUG: clisp port segfaults in some situations

Please use summary prefix.

comment:7 Changed 15 years ago by gwright@…

Resolution: fixed
Status: assignedclosed

Port has been updated to 2.34. I believe the changes to the stream processing have (finally) fixed this bug.

I'm going to close it, but feel free to reopen it if the problem happens again.

-Greg

Note: See TracTickets for help on using tickets.