Commit graph

7347 commits

Author SHA1 Message Date
Marius Gerbershagen
30a4e64c97 fix typo in ecl_clear_interrupts_env() 2018-01-22 21:11:24 +01:00
Marius Gerbershagen
1265ab111a threading: add error message for forgotten ecl_enable_interrupts 2018-01-22 21:11:24 +01:00
Marius Gerbershagen
5b28a8fc1f threading: make sure that spinlocks are unlocked
If a thread is killed while it holds a spinlock, the lock will
    never be released, leading to deadlocks. Hence we have to clean
    up spinlocks in ECL_WITH_SPINLOCK_END. In mp_process_enable,
    other cleanup (deallocating the environment, unlisting the
    process) has to performed too.
2018-01-22 21:08:34 +01:00
Marius Gerbershagen
ba8b85fc22 make sure interrupts are enabled again after having been disabled
This is important to prevent race conditions. If interrupts are
    left disabled, the environment may be wrongly write protected by
    an interrupting thread and completely harmless writes in the
    environment can lead to segmentation faults.
2018-01-14 20:26:15 +01:00
Marius Gerbershagen
6316012408 fix race condition when a process during cleanup is interrupted too early by a call to mp_exit_process
If a process, that has already unwound its whole frame stack
  (after ECL_CATCH_ALL_END in thread_entry_point) is interrupted by
  a call to mp_exit_process, ECL will crash with a segmentation
  fault. We thus need to aquire the start_stop_spinlock before we
  unwind the frame stack.
2018-01-07 16:31:40 +01:00
Marius Gerbershagen
f5a503c862 fix segmentation faults when a signal is queued for a thread whose environment is write protected
If a thread is interrupted while interrupts are disabled by C,
    then the signal is queued and the environment is write protected
    by mprotect. If another thread then calls queue_signal, it will
    try to write in the protected environment, leading to a
    segmentation fault. Since mprotect can only protect whole memory
    pages, we need to allocate the pending interrupts and the signal
    queue in a separate struct.
2018-01-06 17:58:59 +01:00
Marius Gerbershagen
9227f4e342 fix #409: order of evaluation of values forms
the fix for #330 is unaffected
2017-12-29 16:58:27 +01:00
Marius Gerbershagen
39000946e3 bytecmp: Make sure that load time forms are applied in the correct order. Fixes #312 2017-12-19 21:13:11 +01:00
Daniel Kochmanski
2e9c58b3d4 mulithreading: fix semaphore-signal
It didn't wake up all processes to check the condition what caused n+1 lag in
condition check for signal-process (when called with n>1). Fixes #421. No
regression test, because this is already tested in sem-signal-* tests (they were
failing).
2017-12-08 13:40:34 +01:00
Daniel Kochmanski
a51f28f6a5 tests: improve some fail explanations, add last-fail var 2017-12-08 13:40:34 +01:00
Daniel Kochmanski
5bb14d94c7 cosmetic: add ignore declaration
see #16.
2017-12-08 13:40:34 +01:00
Daniel Kochmański
fead4ce858 Merge branch 'develop' into 'develop'
Fix for #292

See merge request embeddable-common-lisp/ecl!97
2017-12-08 07:23:29 +00:00
Marius Gerbershagen
31ed58b7c3 add regression test for #292 2017-12-02 22:08:39 +01:00
Marius Gerbershagen
a0a1a54747 don't check type declarations for default values of optional and keyword function arguments
almost all other implementations do the same, so we should also
allow this edge case
2017-12-02 21:49:46 +01:00
Daniel Kochmański
21f0b92fdd Merge branch 'develop' into 'develop'
New documentation: small update

See merge request embeddable-common-lisp/ecl!96
2017-11-28 19:41:24 +00:00
Tomek Kurcz
f34938c506 Port the porting ECL section from the old doc 2017-11-25 13:00:47 +01:00
Tomek Kurcz
5116a13ebc Port the interpreter section from the old doc 2017-11-25 12:55:46 +01:00
Tomek Kurcz
de5e28ccac Update status.org for the new documentation
Some things that are actually written already weren't ticked in the
TODO list.
2017-11-25 12:36:51 +01:00
Marius Gerbershagen
80ced3c9b1 add test for #418 2017-11-21 18:00:25 +01:00
Marius Gerbershagen
2f48a7df9d loop.lsp: remove wrong type declaration for on keyword. Fixes #418 2017-11-21 17:59:20 +01:00
Daniel Kochmański
d2fc77d4f9 Merge branch 'develop' into 'develop'
Fix #410 link error as feenableexcept not present on OSX.

Closes #410

See merge request embeddable-common-lisp/ecl!95
2017-11-05 10:10:45 +00:00
Marius Gerbershagen
c279138bb2 bytecmp.lisp: allow T for :output-file in bc-compile-file. Fixes #393 2017-11-03 20:29:09 +01:00
Fabrizio Fabbri
45722f06c9
Fix #410 link error as feenableexcept not present on OSX. 2017-10-23 00:40:37 -04:00
Daniel Kochmanski
e45b808aa8 help: add documentation for posix threads (process module) 2017-10-11 10:55:43 +02:00
Daniel Kochmanski
92206c1704 help: update open doc 2017-10-11 10:27:10 +02:00
Daniel Kochmanski
e42d95d41a cosmetic: some indent fixes 2017-10-11 10:27:01 +02:00
Daniel Kochmanski
a7e376c0b5 process: use newly added interface make-stream-from-fd 2017-10-11 10:26:30 +02:00
Daniel Kochmanski
c771b46c5f feature: export make-stream-from-fd interface 2017-10-11 10:25:59 +02:00
Daniel Kochmanski
05871c943a fix debugging leftover 2017-10-09 22:56:32 +02:00
Daniel Kochmanski
835e85bc99 cleanup: remove dead code block
if x length is < 5, reader will signal an error, so it will never be
equal 2. Probably a leftover from some previous bytecodes
implementation state.
2017-10-09 22:51:52 +02:00
Daniel Kochmanski
9ba7440782 bytecmp: be smart wrt bytecompiled code
bytecompiled functions may not have a name (i.e lambda assigned to
smothing). Recognize that fact, so when we read back such functions
from file we can call bc-compile on them. Fixes #313.
2017-10-09 22:45:50 +02:00
Daniel Kochmanski
b851e85701 cosmetic: line unwrap 2017-10-09 22:45:38 +02:00
Daniel Kochmanski
21f670894a run-program: fix typo 2017-10-09 10:15:21 +02:00
Daniel Kochmanski
a42d199b6a run-program: move t->stream coercion at the beginning
this is important for piping.
2017-10-09 10:01:19 +02:00
Daniel Kochmanski
e329d5bb49 tests: fix test for non-thread builds 2017-10-09 09:47:50 +02:00
Daniel Kochmanski
b00b15b078 external-process: use locks only when threads are enabled 2017-10-09 09:38:26 +02:00
Daniel Kochmanski
3d7f68445b changelog: add run-program changes 2017-10-09 09:36:05 +02:00
Daniel Kochmanski
3c4e374feb tests: run-program: enable tests for virtual streams 2017-10-09 09:36:02 +02:00
Daniel Kochmanski
3043dac56b ext:run-program: implement virtual streams for input/output/error 2017-10-09 09:35:59 +02:00
Daniel Kochmanski
2a98ce10fe core: si:copy-stream has three arguments
argument `wait' denots, whenever we wait for EOF or yield when there
is no input available in the first stream.
2017-10-09 09:35:54 +02:00
Daniel Kochmanski
7cad2c8e7d types: introduce ext:virtual-stream type
This type applies to all streams which doesn't have a
descriptor (gray:fundamental-stream and string-stream for now).
2017-10-08 20:21:49 +02:00
Daniel Kochmański
fb90d28ab5 Merge branch 'develop' into 'develop'
doc typos (building.txi)

See merge request embeddable-common-lisp/ecl!94
2017-10-03 05:05:50 +00:00
vindarel
32fbbd69a4 doc typos (building.txi) 2017-10-02 06:21:53 +00:00
Daniel Kochmanski
d02ec85d24 ffi: void functions return no values 2017-09-30 20:34:08 +02:00
Daniel Kochmanski
4915f8bc33 bump asdf 2017-09-30 16:07:10 +02:00
Daniel Kochmanski
fe392867c3 consistency: defcallback always returns just pointer, not a list
Fixes #223.
2017-09-30 12:23:57 +02:00
Daniel Kochmanski
6baadf2a06 ext:run-program: handle diligently nil as stream argument 2017-09-30 11:53:39 +02:00
Daniel Kochmanski
270450a660 asdf: update to version 3.1.8.7
This version fixes mal-handling of :if-feature clauses which correct
loading of systems using it.
2017-09-30 11:12:29 +02:00
Daniel Kochmanski
54f7f9c424 sb-bsd-sockets: socket-receive: add default element-type 2017-09-30 11:12:00 +02:00
Daniel Kochmanski
35e5e14915 changelog: add last changes 2017-09-29 21:11:52 +02:00