aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorLines
3 daysFix #1723 - handle prompt longer than terminal is wide.HEADmasterCalvin Rose-8/+28
When this happened, we tried to print a buffer with a negative length that resulted in invalid memmove call. This fix both checks that we don't tried to append a negative buffer, and truncates a prompt that is too long for the termimal so that one can still enter text with at least 16 visible characters for data entry.
3 daysfix janet_make_threaded to return threaded channel (#1724)PinieP-1/+1
janet_make_threaded previously created a channel with threaded set to 0
4 daysAlign items in multiline pretty format (%m and %p) (#1721)McSinyx-43/+127
Indentation levels are not sufficiently clear for deeply nested data structures. Instead, align items in a collection with its opening bracket, also known as hanging indentation. To avoid guessing the length of a "short" collection to print it on one line, items are now always printed on separate lines.
7 daysUpdate CHANGELOG.mdCalvin Rose-0/+2
7 daysUse ConnectEx for non-blocking connect on windows when available.Calvin Rose-40/+152
Still fallback to blocking connect with WSAConnect when ConnectEx is not available or applicable, but ConnectEx is preferred and recommended by Microsoft. Also make some changes to our use of OVERLAPPED in various places in the ev code, replacing all uses with JanetOverlapped. This also let's us avoid reusing internal fields for OVERLAPPED which may or may not be used in various places.
9 daysCast for warning on mingw DWORD printing.Calvin Rose-1/+1
9 daysTry io.h on windowsdup-fixCalvin Rose-0/+1
9 daysFix regression where private main was not run.Calvin Rose-1/+1
9 daysDup io file descriptors when marshalling closable files.Calvin Rose-10/+45
For unclosable files, no need to dup, but for closable files we can get a resource leak. Valgrind and similar tools won't catch this but IO will unexpectedly start going to the wrong descriptor if a file was transferred to a new thread, closed, and then a new file was created.
10 daysMove some files around code more defensively for mitigation.Calvin Rose-1/+1
10 daysFix GC collecting active fiber during nested janet_continue (#1720)Brett-0/+155
janet_collect() marks janet_vm.root_fiber but not janet_vm.fiber. When janet_pcall (or janet_continue) is called from a C function, the inner fiber becomes janet_vm.fiber while root_fiber still points to the outer fiber. If GC triggers inside the inner fiber's execution, the inner fiber is not in any GC root set and can be collected — including its stack memory — while actively running. This also affects deeply nested cases: F1 -> C func -> janet_pcall -> F2 -> C func -> janet_pcall -> F3, where F2 is saved only in a C stack local (tstate.vm_fiber), invisible to GC. Fix: in janet_continue_no_check, root the fiber with janet_gcroot when this is a nested call (root_fiber already set). Each nesting level roots its own fiber, handling arbitrary depth. Top-level calls (event loop, REPL) skip the root/unroot entirely since root_fiber is NULL. Add test/test-gc-pcall.c: standalone C test covering both single and deep nesting cases. Co-authored-by: Brett Adams <brett@bletia-9.local>
12 daysTweak a docstring and a comment (#1718)sogaiu-3/+3
Co-authored-by: sogaiu <983021772@users.noreply.github.com>
2026-02-21Check stderr for redirection before turning on/off color.Calvin Rose-2/+2
2026-02-20Add sanitizer test to github actions and sr.ht builds.Calvin Rose-0/+20
This will run both clang and gcc sanitizers as part of ordinary testing.
2026-02-20Avoid memory leak when canceling fibers with threaded channels.Calvin Rose-8/+18
Objects in channels are sent as messages that need to be freed by the consumer. However, in certain cases, no consumer is available and the messages were being discarded without properly being freed. This should also fix `-fsanitize=address` on GCC and CLANG with the default test suite.
2026-02-20Remove older extra channel unlocks.Calvin Rose-18/+0
2026-02-20Add builders for issue #1716Calvin Rose-2/+2
2026-02-20Suspicious locking behavior with select.Calvin Rose-0/+2
This looks like it could cause deadlocks with threaded channels (normal channels are unaffected, locking/unlocking is a no-op).
2026-02-20fix multicast on illumos (#1717)R Fisher-1/+1
illumos, like BSD, expects IP_MULTICAST_TTL to be an unsigned char
2026-02-18Prepare for next patch release.Calvin Rose-4/+7
2026-02-18Fix vestigial doc string.Calvin Rose-3/+1
2026-02-18Prepare for v1.41.2 and indicate vm changes for stack correction.v1.41.2Calvin Rose-0/+1
2026-02-181.42.2 patch.Calvin Rose-1/+1
2026-02-18Update for 1.41.2 patch.Calvin Rose-5/+5
2026-02-17Update CHANGELOG.mdCalvin Rose-0/+1
2026-02-17Generate JOP_PUT_INDEX in the compiler when possible.Calvin Rose-9/+26
2026-02-17Add regression test for issue #1714Calvin Rose-0/+8
2026-02-17Initialize memory allocated by put (#1715)Evan Shaw-0/+8
2026-02-16Use snprintf instead of sprintf - sequel (#1713)sogaiu-5/+6
Co-authored-by: sogaiu <983021772@users.noreply.github.com>
2026-02-16Code defensively with regard to stack resizes from custom get and putCalvin Rose-18/+59
for abstract types. Abstract types whose get/put/length/etc. implementations allocated fiber slots could break the VM by invalidating the stack pointer in the interpreter. This is admittedly a bit unusual but is something most users would probably expect to work. Debugging this would be a real pain.
2026-02-15Expose module/add-syspath and update CHANGELOG.mdCalvin Rose-1/+6
2026-02-15Don't reference argv after fiber may have been resized.Calvin Rose-2/+4
2026-02-15Improve ability to load modules by full path.Calvin Rose-1/+20
Be explicit when we are including this functionality. Add a function module/add-file-extension that can do this programatically.
2026-02-15Allow garbage collection to be called inside the module entry.Calvin Rose-0/+3
This usually shouldn't be needed, but in the case that it is, or if garbage collection is triggered manually, we can prevent use-after-free.
2026-02-15Remove macos-13Calvin Rose-1/+1
2026-02-15Patch release to 1.41.1v1.41.1Calvin Rose-5/+5
2026-02-15Add explicit include of inttypes.hCalvin Rose-0/+1
2026-02-15Use correct format specifier on windows if missing message.Calvin Rose-1/+1
2026-02-15Cosmo libc builds were not working.cosmo-fixupCalvin Rose-4/+23
2026-02-15Sort keys when compiling struct and table literals.Calvin Rose-4/+18
Order of evaluation becomes more clear in some cases.
2026-02-15Prepare for 1.41.0 releasev1.41.0Calvin Rose-1/+2
2026-02-14Work on windows for WSAConnect not working.Calvin Rose-5/+11
For remote connections, if you did not manually wait for the connection to settle, the programmer would see unspecified network errors. This is is because the underlying TCP Connection had not been established yet. The correct way to deal with this is to use ConnectEx if available instead of WSAConnect.
2026-02-14Update for msvc build.Calvin Rose-1/+1
2026-02-14Use snprintf instead of sprintf (#1711)sogaiu-3/+3
Co-authored-by: sogaiu <983021772@users.noreply.github.com>
2026-02-14When pretty printing, don't sort keys for huge tables.Calvin Rose-38/+61
This was exposed when printing `(invert (range 200000))`, which isn't so large that we shouldn't be able to sort it, but was taking far too long to compute.
2026-02-13Don't use preload on absolute paths.Calvin Rose-3/+8
When importing full paths, the old preload code was preventing (import <fullpath> :fresh true) from working as expected.
2026-02-06Merge branch 'make-modules-easier'Calvin Rose-8/+17
2026-02-06Remove extra output from peg test.Calvin Rose-3/+5
2026-02-06VERBOSE=1 caused tests to fail as we did more asserts inside the assert.Calvin Rose-9/+5
Thenc checked stderr for messages. Since the helper makes assert write to stderr, this caused extra cruft in our test output.
2026-02-06More tweaks to peg suite for arm32 failures.Calvin Rose-3/+5