You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jane street is using a segfault function for debugging.
It is doing Obj.set_field (Obj.repr 0) 0 (Obj.repr string_that_should_be_easy_to_detect)
With flambda, this is detected as a misuse of set_field because the literal 0 is (rightly) not considered to be a valid mutable block. set_field seems to be one of the most common misuse unsafe function and its behavior might change in some undefined cases. This check is done to catch early some of those problems.
The best way is probably to add a "trap" primitive that is lowered to dereferencing 0 in cmm.
Jane street is using a segfault function for debugging.
It is doing
Obj.set_field (Obj.repr 0) 0 (Obj.repr string_that_should_be_easy_to_detect)
With flambda, this is detected as a misuse of
set_field
because the literal 0 is (rightly) not considered to be a valid mutable block.set_field
seems to be one of the most common misuse unsafe function and its behavior might change in some undefined cases. This check is done to catch early some of those problems.The best way is probably to add a "trap" primitive that is lowered to dereferencing 0 in cmm.
see https://github.com/janestreet/core_extended/blob/5dab51f080759f032674e0c793d3fd02dfc95800/src/low_level_debug.ml#L12
The text was updated successfully, but these errors were encountered: