Should be the latest:

ECL (Embeddable Common-Lisp) 12.7.1
(git:99b1e54eb07373bda77110761c5143d2ad614e6c)
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.
Top level in: #<process TOP-LEVEL>.

Here is the test case that reproduces it for me

It will print a, but not b so it froze on defclass.


2012/11/5 Mark Cox <markco...@gmail.com>

> Hi Peter,
>
> On Mon, Nov 5, 2012 at 11:10 AM, Peter Enerccio <enerc...@gmail.com>
> wrote:
> > Hello, if I attempt to create new class in code evaluated in thread, it
> will
> > either ends with segfault or it will simply freeze the thread. Evaluating
> > same code in main thread is fine.
>
> Which version of ECL are you using?
>
> The following works fine for me with 4a4c2289d
> (mp:process-run-function 'create-my-class #'(lambda ()
>                                               (eval `(defclass my-class ()
>                                                        ()))))
>
> (sleep 5)
> (print (make-instance 'my-class))
> (terpri)
>
> Thanks
> Mark
>
> >
> > --
> > Bc. Peter Vaňušanik
> > http://www.bishojo.tk
> >
> >
> >
> ------------------------------------------------------------------------------
> > LogMeIn Central: Instant, anywhere, Remote PC access and management.
> > Stay in control, update software, and manage PCs from one command center
> > Diagnose problems and improve visibility into emerging IT issues
> > Automate, monitor and manage. Do more in less time with Central
> > http://p.sf.net/sfu/logmein12331_d2d
> > _______________________________________________
> > Ecls-list mailing list
> > Ecls-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ecls-list
> >
>



-- 
Bc. Peter Vaňušanik
http://www.bishojo.tk
#include <ecl/ecl.h>
#include <gc.h>
#include <pthread.h>

void* eval_test(void* buffer){
	ecl_import_current_thread(Cnil, Cnil);
	cl_object evaled = c_string_to_object(buffer);
	cl_safe_eval(evaled, Cnil, ecl_process_env());
	ecl_release_current_thread();
	return NULL;
}

int main(int argc, char** argv){

	cl_boot(argc, argv);

	pthread_t thread;
	pthread_create(&thread, NULL, &eval_test, (void*)"(load \"x.lisp\")");
	void* ret;
	pthread_join(thread, &ret);


	cl_shutdown();

	return 0;
}

Attachment: x.lisp
Description: Binary data

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to