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:
Calvin Rose
2026-06-21 11:46:57 -05:00
parent de3bb4ceb2
commit ffb83301c5
3 changed files with 28 additions and 5 deletions
+3 -1
View File
@@ -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) {
+4
View File
@@ -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)