Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove expensive debug assertion from dynlink #10184

Merged
merged 2 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Working version
directory.
(Nicolás Ojeda Bär, review by Gabriel Scherer and Xavier Leroy)

- #10184: Remove expensive debug assertion from dynlink.
(Leo White, review by David Allsopp and Xavier Leroy)

- #10185: Consider that IPv6 is always enabled on Windows.
(Antonin Décimo, review by David Allsopp and Xavier Leroy)

Expand Down
10 changes: 0 additions & 10 deletions otherlibs/dynlink/dynlink_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ module Make (P : Dynlink_platform_intf.S) = struct
were privately loaded. *)
}

let invariant t =
let ifaces = String.Map.keys t.ifaces in
let implems = String.Map.keys t.implems in
assert (String.Set.subset implems ifaces);
assert (String.Set.subset t.main_program_units ifaces);
assert (String.Set.subset t.main_program_units implems);
assert (String.Set.subset t.public_dynamically_loaded_units ifaces);
assert (String.Set.subset t.public_dynamically_loaded_units implems)

let empty = {
ifaces = String.Map.empty;
implems = String.Map.empty;
Expand Down Expand Up @@ -275,7 +266,6 @@ module Make (P : Dynlink_platform_intf.S) = struct
public_dynamically_loaded_units;
}
in
State.invariant state;
state
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Called from Test10_plugin.f in file "test10_plugin.ml", line 6, characters 2-6
Called from Test10_plugin in file "test10_plugin.ml", line 10, characters 2-6
Called from Dynlink.Bytecode.run in file "otherlibs/dynlink/dynlink.ml", line 137, characters 16-25
Re-raised at Dynlink.Bytecode.run in file "otherlibs/dynlink/dynlink.ml", line 139, characters 6-137
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 347, characters 13-44
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 337, characters 13-44
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 345, characters 8-240
Re-raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 355, characters 8-17
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 335, characters 8-240
Re-raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 345, characters 8-17
Called from Test10_main in file "test10_main.ml", line 51, characters 13-69
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.m
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.ml", line 85, characters 12-29
Re-raised at Dynlink.Native.run.(fun) in file "otherlibs/dynlink/native/dynlink.ml", line 87, characters 10-149
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 347, characters 13-44
Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 337, characters 13-44
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 345, characters 8-240
Re-raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 355, characters 8-17
Called from Dynlink_common.Make.loadfile in file "otherlibs/dynlink/dynlink_common.ml" (inlined), line 357, characters 26-45
Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 335, characters 8-240
Re-raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 345, characters 8-17
Called from Dynlink_common.Make.loadfile in file "otherlibs/dynlink/dynlink_common.ml" (inlined), line 347, characters 26-45
Called from Test10_main in file "test10_main.ml", line 49, characters 30-87