Commit graph

8019 commits

Author SHA1 Message Date
Daniel Kochmański
57f58eaeee Merge branch 'wcon-stream-fixes' into 'develop'
Fix encoding issues for msvc

Closes #580, #582, and #581

See merge request embeddable-common-lisp/ecl!220
2020-08-14 07:01:38 +00:00
Marius Gerbershagen
6048b09ab2 Merge branch 'develop' into 'develop'
checking that makeinfo works; better messages

See merge request embeddable-common-lisp/ecl!221
2020-08-13 15:14:14 +00:00
Marius Gerbershagen
adaeaaf06c gc: fix for finalizers called from non-initialized threads
We can't use the standard functions like cl_list for allocating the
wrapper object for the finalizer since these need a working environment
for disabling interrupts.
2020-08-02 10:55:25 +02:00
Marius Gerbershagen
da62cfd203 multithreading: fix segfaults in ecl_import_current_thread
We also need the interrupt_struct in the fake env to allow explicitely
checking for interrupts on platforms where this doesn't happen implicitely
by using mprotect.
2020-08-02 10:55:25 +02:00
Marius Gerbershagen
34b17a9fe0 unixint.d: remove unused argument to si::handle-signal
Argument was unused since commit c5d2408cc5
2020-08-02 10:55:25 +02:00
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
Dima Pasechnik
f291264ffc checking that makeinfo works; better messages 2020-07-20 09:35:58 +01:00
Daniel Kochmański
329b37d833 Merge branch 'inline-closure' into 'develop'
Fix inlining of closures (2nd try)

Closes #577

See merge request embeddable-common-lisp/ecl!209
2020-07-18 18:29:06 +00:00
Marius Gerbershagen
c7d6ddbf38 cmp: fix inlining of local closures (2nd try)
We need to compile the function body in the same environment in which
the function was defined. However the function arguments need to be
compiled in the current argument.

Fixes #577.
2020-07-18 15:07:04 +02:00
Marius Gerbershagen
a9a63b1d50 cmp: small refactor of (funcall/apply (lambda ...) ...) handling
Unify handling of LAMBDA and LAMBDA-BLOCK in c1funcall and c1apply,
split off computation of let bindings and body in
optimize-funcall/apply-lambda into a separate function.

Preliminary work to fix inlining of local closures.
2020-07-18 15:07:04 +02:00
Marius Gerbershagen
a5671dcdab cmp: refactor c1let/let* into two stages
First stages handles the bindings, second stage the body, needed to
get inlining of local closures right.
2020-07-18 15:07:04 +02:00
Daniel Kochmański
ff0c0acd55 Merge branch 'run-program-virtual-input-streams' into 'develop'
Improve run-program with virtual input streams

See merge request embeddable-common-lisp/ecl!219
2020-07-17 10:25:13 +00:00
Eric Timmons
bbbc655931 process: Propagate EOFs to child process on virtual input streams
When piping streams to child processes, if the virtual input stream returns an
EOF, close the pipe to the child.
2020-07-16 15:41:32 -04:00
Daniel Kochmański
ee9ff4fce5 Merge branch 'signal-handler-fixes' into 'develop'
Fix #592

Closes #592

See merge request embeddable-common-lisp/ecl!212
2020-07-13 13:15:27 +00: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
Eric Timmons
6cbec9fe2b Add a failing test for run-program :wait nil
In this test, the EOF on the virtual input stream to the process is not
propagated to the child process, resulting in the test hanging.
2020-06-26 13:07:26 -04: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
a8042286ff queue_signal: prevent circular lists in pending_interrupt
Leads to infinite loops in handle_all_queued.
2020-06-01 17:26:14 +02:00
Marius Gerbershagen
ed11e2cc35 fix spinlock handling in queue_signal and pop_signal
We can't use the ECL_WITH_SPINLOCK_BEGIN/END macros since they check
for pending interrupts at the end of their unwind-protect frame. This
leads to various bugs:

- in queue_signal the to be queued interrupt is executed immediately
  after being queued even if interrupts are disabled
- in pop_signal if multiple interrupts are queued they are executed in
  reverse order

To fix these issues, use a) ecl_get/giveup_spinlock directly and b)
ecl_disable/enable_interrupts_env to prevent the spinlock not being
released due to an interrupt happening during the execution of the
main body of pop_signal/queue_signal.
2020-06-01 17:18:35 +02: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