Embeddable Common-Lisp main repository.
Find a file
Daniel Kochmański 09622435bc core: fix a race condition between core symbols and the gc
The GC is enabled when we create initial symbols. The function make_this_symbol
initializes symbols from a static table as follows:

1. initialize symbol structure fields
2. associate the symbol with its package
3. associate the symbol with its function
4. increment cl_num_symbols_in_core

Most notably in point 2:
s->symbol.name = ecl_make_constant_base_string(name,-1);

GC's stacks_scanner marks

  [cl_symbols; cl_symbols+cl_num_symbols_in_core]

in other words, if the GC kicks in between 1. and 4., the symbol name may be
garbage collected, messing the symbol name and package exports.

To mitigate that, we assign intermediate values on the stack and increment
the number of symbols in core after the symbol is initialized:

1. store initialization values on stack -- cl_object foo = alloc();
2. initialize symbol structure fields
3. increment cl_num_symbols_in_core
4. associate the symbol with its package and function
2025-05-20 13:57:21 +02:00
contrib Small compatibility fixes 2024-10-07 07:42:22 +02:00
examples Update asdf_with_dependence example readme 2023-07-09 18:04:35 +00:00
msvc core: factor out process managament from thread managament 2025-03-31 20:44:46 +02:00
src core: fix a race condition between core symbols and the gc 2025-05-20 13:57:21 +02:00
.gitignore .gitignore: add the directory /local as ignored 2023-05-22 10:16:39 +02:00
.gitlab-ci.yml Add .gitlab-ci.yml 2017-01-11 18:30:33 +00:00
appveyor.yml Add simple appveyor msvc build 2017-05-13 00:12:13 +02:00
CHANGELOG Revert "Merge branch 'remove-small-cons' into 'develop'" 2024-12-15 10:01:30 +00:00
configure Preserve quoting when passing the arguments to the build directory 2008-08-27 09:50:44 +02:00
COPYING cleanup: update license to lgpl-2.1+ in both headers and text 2024-01-14 12:22:27 +01:00
INSTALL initial port to cosmopolitan libc 2024-09-09 10:14:17 +02:00
LICENSE cleanup: update license to lgpl-2.1+ in both headers and text 2024-01-14 12:22:27 +01:00
Makefile.in Makefile: allow both install and flatinstall targets 2024-02-24 22:30:16 +01:00
README.md update readme (typos) 2015-08-31 08:22:52 +00:00

ECL stands for Embeddable Common-Lisp. The ECL project aims to produce an implementation of the Common-Lisp language which complies to the ANSI X3J13 definition of the language.

The term embeddable refers to the fact that ECL includes a Lisp to C compiler, which produces libraries (static or dynamic) that can be called from C programs. Furthermore, ECL can produce standalone executables from Lisp code and can itself be linked to your programs as a shared library. It also features an interpreter for situations when a C compiler isn't available.

ECL supports the operating systems Linux, FreeBSD, NetBSD, DragonFly BSD, OpenBSD, Solaris (at least v. 9), Microsoft Windows (MSVC, MinGW and Cygwin) and OSX, running on top of the Intel, Sparc, Alpha, ARM and PowerPC processors. Porting to other architectures should be rather easy.