Keno/julia-wasm

Missing GC root somewhere

Keno opened this issue · 1 comments

Keno commented

Same code as #10, but with that fixed, we see some sort of memory corruption, most likely a missing GC root:

julia> to_html = x->(buf = IOBuffer(); show(buf, MIME"text/html"(), x); String(take!(buf)))
getfield(Main, Symbol("##5#6"))()
julia> to_html(methods(gcd))
TypeError(func=:getfield, context="", expected=DataType, got=<?#0x1259600::<?#0x1259620::<?#0x91e1a0::<?#0x91e610::Array{Any, (4,)}[
  Symbol("#self#"),
  :result,
  :cached,
  :params]>>>>)

works fine if GC is disabled GC.enable(false).

Keno commented

I think I found this. Will re-open if I see this again after re-enabling the GC.