mirror of
https://github.com/janet-lang/janet
synced 2026-10-11 18:21:42 +00:00
Handle bad ev/thread construction better.
We were incorrectly handling bad arguments to create a new thread resulting in corruption.
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
#include <janet.h>
|
||||
|
||||
/* Disable leak sanitizer */
|
||||
int __lsan_is_turned_off(void) { return 1; }
|
||||
int __lsan_is_turned_off(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
|
||||
|
||||
@@ -605,4 +605,8 @@
|
||||
(assert (zero? exit-code) "subprocess ran")
|
||||
(assert (= data "hi\nthere\n") "output is correct")
|
||||
|
||||
# Error handling
|
||||
(assert-error "bad thread" (ev/thread in))
|
||||
(assert-error "bad thread 2" (ev/thread (fn [x y] x) 1))
|
||||
|
||||
(end-suite)
|
||||
|
||||
Reference in New Issue
Block a user