Closed hackwaly closed 8 months ago
Realuse feedback: sometimes segfault occurs
Realuse feedback: sometimes segfault occurs
fixed.
When exactly do these appear? I haven't used earlybird for a while.
I just tried it on a tiny dummy program and found Global → Stdlib → stdout
to be one of these opaque blocks with two opaque blocks inside. But when I try to look into them, the debugger still seems to segfault and End_of_file
somehow appears as the value.
When exactly do these appear? I haven't used earlybird for a while.
I just tried it on a tiny dummy program and found
Global → Stdlib → stdout
to be one of these opaque blocks with two opaque blocks inside. But when I try to look into them, the debugger still seems to segfault andEnd_of_file
somehow appears as the value.
Previously Scene.get_tag
miss a if not (is_block rv) then Lwt.return Obj.int_tag
guard. That cause segfault while inspecting opaque block with int field. I push the commit with --force
, did you confirm your test version with that change?
I noticed the force push, the get_tag
change is there.
I looked into it a bit and think I've figured it out: stdout
is some particularly special stuff coming from the OCaml runtime, it uses custom_tag
. Blocks with custom_tag
and abstract_tag
have completely arbitrary contents (not structured into a number of block fields) and shouldn't be looked into at all because they can contain arbitrary out-of-heap pointers and cannot contain any OCaml heap references.
I pushed a fix to skip those.
Shall we release this with those TODO(s)? I think it's a big improvement.
I think the TODOs are fine, all the most common things are already covered.
I'll try this on a larger project in case some other issue pops up. If it seems fine, I'll merge this and can do a release.
There's extra object_tag, infix_tag, forward_tag and no_scan_tag not handled. I don't know the meanings of those tags. Maybe we should handle those tags as well.
let lazy_tag = 246
let closure_tag = 247
let object_tag = 248
let infix_tag = 249
let forward_tag = 250
let no_scan_tag = 251
let abstract_tag = 251
let string_tag = 252
let double_tag = 253
let double_array_tag = 254
let custom_tag = 255
let final_tag = custom_tag
Close #52
TODO:
heuristic list value