Commit graph

8003 commits

Author SHA1 Message Date
Marius Gerbershagen
2e94a6ac29 cmp: read msvc output in using the correct encoding
Fixes #581.
2020-08-02 10:55:25 +02:00
Marius Gerbershagen
892a34e66d fix encoding issues on windows console streams
Always use the byte sized input/output operations ReadConsoleA/WriteConsoleA
and do all the conversion to unicode by ourself.

Moreover, expand the set of known encodings for Windows codepages and print
a warning if we encounter an unsupported codepage.

Fixes #582.
2020-08-02 10:55:25 +02:00
Marius Gerbershagen
0eedaf533d streams: don't signal error in file-position for windows console and socket streams
This is more consistent with other streams for which file-position
doesn't make sense, which also just return nil instead of signaling
errors.

Fixes #580.
2020-07-04 17:58:46 +02:00
Marius Gerbershagen
75877dd8f0 fpe: fix ECL_WITH_LISP_FPE macro
We can't use ecl_process_env_unsafe() == NULL to check if ECL has
booted because the return value of ecl_process_env_unsafe is
unpredictable before ECL has booted. The reason is that
ecl_process_env_unsafe calls pthread_getspecific with an uninitialized
key stored in cl_env_key. But another call to pthread_setspecific
might have already registered a key which happens to be the same as
the not yet initialized cl_env_key, yielding a non-NULL value.
2020-06-28 11:16:17 +02:00
Marius Gerbershagen
c1b5aee6de Merge branch 'mp-timedwait2' into 'develop'
Mp timedwait2

Closes #588

See merge request embeddable-common-lisp/ecl!217
2020-06-20 14:58:19 +00:00
Marius Gerbershagen
18fa789536 Merge branch 'patch-1' into 'develop'
fix a broken link in INSTALL, see #595

See merge request embeddable-common-lisp/ecl!218
2020-06-20 14:42:05 +00:00
Daniel Kochmański
4b9d6d2b34 cosmetic: add noteworthy changes to the changelog 2020-06-20 16:36:32 +02:00
Daniel Kochmański
44299c7221 contrib: serve-event: make serve-event multithreading save
Only call handlers established in the current thread and use atomic
operations to update *descriptor-handlers*.
Closes #588.

Additionally:
- improve the test code
- add a test for the leak
- provide internet machine link for the tutorial
2020-06-20 16:36:32 +02:00
Dima Pasechnik
b9676343c7 fix a broken link in INSTALL, see #595 2020-06-17 08:24:55 +00:00
Daniel Kochmański
20ccc68af0 Merge branch 'c-stack-fixes' into 'develop'
Fix #596

Closes #596

See merge request embeddable-common-lisp/ecl!215
2020-06-15 10:36:46 +00:00
Daniel Kochmański
f9db80dcbf cmp: for LAMBDA use an associated function-block-name
That makes lambda with a declaration si:function-block-name behave
consistently with ext:lambda-block (and in eval-macros
ext:lambda-block expands to have this declaration too to behave in
turn consistently with how the compiler treats ext:lambda-block).
2020-06-15 12:34:10 +02:00
Daniel Kochmański
4d9b72a88b ffi: use mp_get_lock_wait instead of mp_get_lock
The former has a fixed number of arguments and is more low-level.
2020-06-15 12:34:10 +02:00
Daniel Kochmański
9741147874 doc: add few annotations for multiprocessing primitives
Mailboxes, barriers and rwlocks are still missing. This is important
if we want to have hints in SLIME for arglists.
2020-06-15 12:34:10 +02:00
Daniel Kochmański
0bd6bd6573 cosmetic: cmp: proclamations: add missing periods 2020-06-15 12:34:10 +02:00
Daniel Kochmański
7dd6609e21 mp: condition variable: fix invalid test for recursiveness
Recursive locks may be determined from the object header while reading
the counter is wrong, because at a time of testing with the CV counter
may be exactly 1 despite the fact that the lock is recursive.
2020-06-15 12:34:10 +02:00
Daniel Kochmański
6322e34415 mp: queue: use less cryptic names
- variable name "o" is replaced with "mp_object"
- typedef "mp_wait_test" to "cl_object(*c)(cl_env_ptr,cl_object)"
2020-06-15 12:34:10 +02:00
Daniel Kochmański
a059991c12 stress tests: use a new timeout condition 2020-06-15 12:34:10 +02:00
Daniel Kochmański
0ab85fc9d5 conditions: add an ext:timeout serious condition 2020-06-15 12:34:10 +02:00
Daniel Kochmański
e7355ac1fc doc: mp: sem: fix a type with a function index 2020-06-15 12:34:10 +02:00
Daniel Kochmański
dc42ba2ec7 Merge branch 'cygwin-fix-gcc-invocation' into 'develop'
fix C compiler invocation for cygwin

See merge request embeddable-common-lisp/ecl!216
2020-06-15 10:25:21 +00:00
Marius Gerbershagen
d6b422fe39 cmp: fix C compiler invocation for cygwin 2020-06-13 11:25:20 +02:00
Marius Gerbershagen
be2d90790f Merge branch 'develop' into 'develop'
make sure C compiler conforms to C99 standard

See merge request embeddable-common-lisp/ecl!214
2020-06-12 19:06:42 +00:00
Marius Gerbershagen
9137c681a8 iOS-arm64.cross_config: fix long long bits 2020-06-12 20:50:35 +02:00
Marius Gerbershagen
9c9f07c4ce mislib.lsp: fix argument type if long-long is not available 2020-06-12 20:50:02 +02:00
Marius Gerbershagen
370e1969d8 stacks: introduce sensible behaviour if getrlimit fails
If getrlimit fails, new_size may be zero. Furthermore, getrlimit may also return
RLIM_INFINITY in which case new_size is way to large. In both cases the real stack size is
unknown and we can only use some sensible default.
2020-06-11 16:33:05 +02:00
Marius Gerbershagen
90043d205c stacks: fix default C stack size
The ifdef in config-internal.h was buggy since RLIMIT_STACK is only defined after
sys/resource.h has been included which it wasn't. This lead to the stack size always being
increased to at least the default of 1 MB. To fix this, we move the check for RLIMIT_STACK
to the configure script.
2020-06-11 15:16:10 +02:00
Daniel Kochmański
0158e14dea clos: stream-read-sequence: fix the order of arguments
Function si:do-read-sequence was called with the stream and the
sequence arguments reversed. Spotted by Christian Schafmeister.
2020-06-11 08:24:30 +02:00
Dima Pasechnik
ff74b3b8e7 make sure C compiler conforms to C99 standard
this is needed e.g. for constructions like
for (int i,...); by default some compilers in older Linux
systems, eg Ubuntu Trusty, still default to C89, giving a build error.
This fix will try to make sure that C99 is used, with an extra option.
2020-06-07 10:11:26 +01:00
Marius Gerbershagen
3b39f2332f Merge branch 'develop' into 'develop'
update config.guess/sub

See merge request embeddable-common-lisp/ecl!213
2020-06-06 13:56:40 +00:00
Dima Pasechnik
21335a6ae5 update config.guess/sub
cf https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html
2020-06-05 12:55:06 +01:00
Marius Gerbershagen
e89dce9631 cmp: fix multiple-value-setq for special variables
We need to save env->nvalues before calling cl_set on any variable
because cl_set overwrites env->nvalues. Otherwise, we only get nil for
any variable after the first special one.

Fixes #591.
2020-05-28 21:23:54 +02:00
Daniel Kochmański
2e337edcf9 Merge branch 'develop' into 'develop'
fix issue #593

Closes #593

See merge request embeddable-common-lisp/ecl!210
2020-05-25 19:19:10 +00:00
Dima Pasechnik
4bce0a0e3c fix issue #593
make check for makeinfo conditional on successful
check for install-info
2020-05-25 11:14:42 +01:00
Daniel Kochmański
d7f4637ef5 Merge branch 'precompiled-headers' into 'develop'
cmp: add support for precompiled header files

See merge request embeddable-common-lisp/ecl!203
2020-05-16 19:41:09 +00:00
Marius Gerbershagen
0d65a6ff5f Merge branch 'fix-586' into 'develop'
slot-definitions-compatible-p: check for the slot class too

Closes #586

See merge request embeddable-common-lisp/ecl!207
2020-05-16 18:17:34 +00:00
Daniel Kochmański
4da8ca54b6 slot-definitions-compatible-p: check for the slot class too
The spec says:

    The generic function make-instances-obsolete is invoked
    automatically by the system when defclass has been used to
    redefine an existing standard class and the set of local slots
    accessible in an instance is changed or the order of slots in
    storage is changed. It can also be explicitly invoked by the user.

If the local slot's class is changed then indeed the set has
changed. We also check whether the slot class is S-D-S-D or S-E-S-D
and in both cases we also decide that layouts are not compatible.

Fixes #586.
2020-05-16 19:55:19 +02:00
Marius Gerbershagen
636cb4cf60 cmp: add support for precompiled header files
Improves compilation speed for single functions by about 40-50
percent. Precompiled headers are specific to the compiler version and
options in use. Due to this, we regenerate the header whenever the
compiler configuration changes.
2020-05-16 18:53:57 +02:00
Daniel Kochmański
46e158e912 Merge branch 'gc-fixes' into 'develop'
Garbage collector fixes

See merge request embeddable-common-lisp/ecl!208
2020-05-12 10:14:36 +00:00
Marius Gerbershagen
ecb71b194a predicate.d: fix equalp for hash tables
According to the spec, we should compare values using equalp if two
matching keys are found, but we were only checking if matching keys
exist.
Fixes #587.
2020-05-10 22:18:44 +02:00
Marius Gerbershagen
e0bf0f5ac2 gc: remove unnecessary workarounds for old bdwgc versions 2020-05-10 19:47:05 +02:00
Marius Gerbershagen
d85326d2a5 tests: add stress tests for interrupt safety 2020-05-08 21:10:41 +02:00
Marius Gerbershagen
6825e1afe0 tests: improvements to stress tests
Use the cl-test package (same as for ordinary tests), declare suite
inside the file and remove infinite loops from tests.
2020-05-08 21:10:41 +02:00
Marius Gerbershagen
42fdbba968 process.d: get start_stop_spinlock in thread_cleanup instead of thread_entry_point
Getting this lock in thread_entry_point was problematic: when the
thread was killed from another thread the catch point in
thread_entry_point was reached and the call to ecl_get_spinlock was
skipped. This lead to threads exiting without protection and to
segfaults.
2020-05-08 21:10:41 +02:00
Marius Gerbershagen
8d2b8d0ce1 unixint.d: unblock SIGSEGV before undoing wirte protection on envinronment
Doing it the other way around leads to race conditions, since an
unlucky interrupt arriving just after the mprotect call (but before
the the_env->disable_interrupts = 0 write) will write protect the
environment again, leading to a segfault. This is no problem if
SIGSEGV is unblocked (in which case we will just enter sigsegv_handler
again and arrive at the same point). However if SIGSEGV is blocked (and
another segfault arises) the whole process will die.
2020-05-08 21:10:41 +02:00
Marius Gerbershagen
d8fbbb213e gc: fix type info for precise garbage collector mode 2020-05-08 21:10:41 +02:00
Marius Gerbershagen
73af5cdcdd gc: fix signal handlers for generational garbage collector
The boehm gc needs SIGSEGV or SIGBUS to track dirty pages (see
GC_write_fault_handler). Thus these signals need to be unblocked at
all times.
2020-05-08 20:57:56 +02:00
Daniel Kochmański
f7f0edebd6 tests: add a regression test for the reverse of 58f17f6c6 2020-05-08 13:50:58 +02:00
Daniel Kochmański
a2a12e2531 Revert "cmp: fix inlining of local closures"
This reverts commit 58f17f6c66.
2020-05-08 13:10:13 +02:00
Daniel Kochmański
cbe5326b0f Merge branch 'feature-one-loop-fix' into 'develop'
Fix declaration for complex for variable

Closes #585

See merge request embeddable-common-lisp/ecl!206
2020-05-07 10:07:49 +00:00
Karsten Poeck
5bfe616bd0 Fix declariotion for complex for variable 2020-05-06 21:46:56 +02:00