Thicket thicket
ocaml
REPOS 27
SEARCH THE ARCHIVE

Repository activity

40458 results across all weeks

  1. IssueW47.2026 · 16–22 Novocaml/ocaml

    Forked child's threads are never preempted

    A forked child keeps Tick_thread_running set with no tick thread, so its threads are never preempted: a program that spins waiting for a thread it created hangs.

    KC Sivaramakrishnan (@kayceesrk)
  2. IssueW47.2026 · 16–22 Novocaml/ocaml

    Forking during a Memprof callback corrupts the child

    A child forked while another systhread is inside a Gc.Memprof callback keeps a pointer to that thread's freed memprof record and writes through it. Unix.fork in a program with threads runs caml_thread_reinitialize in the child. That frees every other thread and calls caml_memprof_delete_thread on its memprof record (st_stubs.c:392, st_stubs.c:470-482). If th…

    KC Sivaramakrishnan (@kayceesrk)
  3. IssueW47.2026 · 16–22 Novocaml/ocaml

    Gc.Memprof leaks stashed callstacks after a stop

    Gc.Memprof leaks C heap when one thread stops a profile while another has a sampled allocation whose callback has not run yet. A sampled allocation stashes its call stack on the C heap (memprof.c:1677-1692). The stash is freed only when the allocation callback runs (memprof.c:1818-1826). If another thread stops the profile before the sampled thread reaches a…

    KC Sivaramakrishnan (@kayceesrk)
  4. IssueW47.2026 · 16–22 Novocaml/ocaml

    Gc.Memprof stop from an alloc callback trips an assertion

    An allocation callback that calls Gc.Memprof.stop, Gc.Memprof.discard and Gc.minor aborts the debug runtime with Assertion failed: entries->size == 0 (memprof.c:2133-2139). The minor GC inside the callback sees the discarded profile, resets the thread table's config and deletes every entry except the running one. When the sampler resumes, the changed config …

    KC Sivaramakrishnan (@kayceesrk)
  5. IssueW47.2026 · 16–22 Novocaml/ocaml

    Gc.Memprof.start in a callback keeps the old sampling gap

    Calling Gc.Memprof.start from inside the previous profile's alloc_minor callback keeps the old profile's next_rand_geom. The new profile's first sample then waits for what is left of the old profile's gap.

    KC Sivaramakrishnan (@kayceesrk)
  6. IssueW47.2026 · 16–22 Novocaml/ocaml

    Gc.Memprof.stop does not stop sampling in child domains

    After Gc.Memprof.stop in the parent, a child domain that was sampling for the same profile can still take a sample, which trips an assertion in the debug runtime. caml_memprof_stop clears only the calling domain's trigger (memprof.c:2303-2321). A child domain that inherited the profile keeps its memprof_young_trigger set until its next minor GC. Until then, …

    KC Sivaramakrishnan (@kayceesrk)
  7. IssueW47.2026 · 16–22 Novocaml/ocaml

    Gc.set accepts a negative space_overhead

    Gc.set { space_overhead = -100 } is accepted, stored as an unsigned, and the major GC stops pacing from allocation. caml_gc_set reads the field with Long_val and passes it to norm_pfree as an unsigned value, which only clamps it to at least 1 (gc_ctrl.c:151-154, :169), so 100 + percent_free wraps and the collector no longer schedules major work by allocation…

    KC Sivaramakrishnan (@kayceesrk)
  8. Pull requestW47.2026 · 16–22 Novocaml/ocaml

    Grow the mark stack when compression cannot make room

    realloc_mark_stack can return without making room on the mark stack. mark_stack_push_range then writes past the end of the stack, and keeps doing so on every later push, because it only reallocates when count == size.

    Nick Barnes (@NickBarnes)
  9. IssueW47.2026 · 16–22 Novocaml/ocaml

    Hashtbl.Make.replace loses a binding when equal resizes

    Hashtbl.Make.replace loses a binding and leaves length too large when the user's equal adds to the same table. replace reads the bucket index i and the bucket l, then walks l calling H.equal (hashtbl.ml:485-489). If equal grows the table, resize installs a new, doubled bucket array and relinks the cells in place (hashtbl.ml:156-165). Back in replace_bucket, …

    KC Sivaramakrishnan (@kayceesrk)
  10. IssueW47.2026 · 16–22 Novocaml/ocaml

    Hashtbl.filter_map_inplace can leave a negative length

    Hashtbl.filter_map_inplace decrements size before the cell is unlinked, so a raise from f leaves length smaller than the number of bindings still in the table:

    KC Sivaramakrishnan (@kayceesrk)
  11. Pull requestW47.2026 · 16–22 Novocaml/ocaml

    Head shapes and constructor unboxing

    This PR implements a variant of the "constructor unboxing" feature proposed by Jeremy Yallop (@yallop) in RFC #14 in March 2020, which extends the current [@@unboxed] annotation for single-constructor variant types (or single-field record types). A first experimental implementation of this feature was done Nicolas Chataing (@nchataing) in Summer 2021. I reba…

    Gabriel Scherer (@gasche)
  12. Pull requestW47.2026 · 16–22 Novocaml/ocaml

    Implement ASAN redzones for runtime events ring buffer

    This introduces the general mechanism described in https://github.com/ocaml/ocaml/issues/15279, and applies it to Runtime_events.

    Török Edwin (@edwintorok)
  13. IssueW47.2026 · 16–22 Novocaml/ocaml

    Improving ASAN tracking of OOB accesses for mmap()-ed regions in the C runtime

    It is desirable to make out of bounds accesses always trap when run under the address sanitizer, especially for testcases.

    Török Edwin (@edwintorok)
  14. Pull requestW47.2026 · 16–22 Novocaml/ocaml

    Inline the full-application part of caml_apply

    Similar to #198, but we structure the code so that the argument loading is not repeated for the caml_apply and full application call, in order to not increase code size too much. This is especially important for functions with many arguments.

    Stefan Muenzel (@smuenzel)
  15. Pull requestW47.2026 · 16–22 Novocaml/ocaml

    Json output for the compiler, part 1: structured metadata for error messages

    This PR is the result of @muskangarg21's Outreachy internship.

    Florian Angeletti (@Octachron)
  16. IssueW47.2026 · 16–22 Novocaml/ocaml

    Lazy.Mutexed.force leaks its mutex on an asynchronous exception

    Lazy.Mutexed.force leaves the mutex locked if an asynchronous exception arrives after the thunk has returned, so the value is lost and the lazy is permanently wedged.

    KC Sivaramakrishnan (@kayceesrk)
  17. IssueW47.2026 · 16–22 Novocaml/ocaml

    Lost ephemeron marking round at the end of `mark`

    A domain can lose an ephemeron round at the end of mark (), leaving an ephemeron with a marked key and unmarked data that no round rescans. The debug runtime asserts in caml_ephe_clean, and the release runtime gives the mutator data that the next cycle frees.

    KC Sivaramakrishnan (@kayceesrk)
  18. IssueW47.2026 · 16–22 Novocaml/ocaml

    Major GC never completes a cycle after a failed `Domain.spawn`

    If domain_create fails after caml_init_major_gc has succeeded, for example because the minor heap arena cannot be committed, Domain.spawn raises Failure and from then on no major cycle completes. Gc.full_major () does not return and the major heap grows without bound.

    KC Sivaramakrishnan (@kayceesrk)
  19. Pull requestW47.2026 · 16–22 Novocaml/ocaml

    Make warning 8 (partial-match) fatal by default in ocamlc and ocamlopt

    Fixes https://github.com/ocaml/ocaml/issues/12475

    Kate (@kit-ty-kate)
  20. IssueW47.2026 · 16–22 Novocaml/ocaml

    Malformed .cmi crashes ocamlobjinfo

    ocamlobjinfo segfaults on a malformed .cmi. Reproduced on trunk f0c1023333 with the in-tree bytecode tools.

    KC Sivaramakrishnan (@kayceesrk)