diff options
author | Steve Vinoski <[email protected]> | 2014-11-04 11:46:19 -0500 |
---|---|---|
committer | Steve Vinoski <[email protected]> | 2014-11-04 11:46:19 -0500 |
commit | 66a184c576d9262045194e95c752a50c74877802 (patch) | |
tree | 2eaf0ccb9b31054d68c1a98584445b93dcf6dba3 /erts/emulator/test/nif_SUITE.erl | |
parent | 487c3858450d27e6838eed19e55c21641d101908 (diff) | |
download | otp-66a184c576d9262045194e95c752a50c74877802.tar.gz otp-66a184c576d9262045194e95c752a50c74877802.tar.bz2 otp-66a184c576d9262045194e95c752a50c74877802.zip |
Fix gc-related problem with dirty NIFs
Ensure that the return value from a dirty NIF call is made part of the GC
rootset. Add a new regression test to nif_SUITE.
Thanks to Daniel Goertzen for reporting the error and providing a test
case, and to Sverker Eriksson for making test case reproducible and finding
the fix.
Diffstat (limited to 'erts/emulator/test/nif_SUITE.erl')
-rw-r--r-- | erts/emulator/test/nif_SUITE.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/test/nif_SUITE.erl b/erts/emulator/test/nif_SUITE.erl index 14e6585220..4560077a51 100644 --- a/erts/emulator/test/nif_SUITE.erl +++ b/erts/emulator/test/nif_SUITE.erl @@ -1564,6 +1564,8 @@ dirty_nif(Config) when is_list(Config) -> Val2 = "Erlang", Val3 = list_to_binary([Val2, 0]), {Val1, Val2, Val3} = call_dirty_nif(Val1, Val2, Val3), + LargeArray = lists:duplicate(1000, ok), + LargeArray = call_dirty_nif_zero_args(), ok catch error:badarg -> @@ -1740,6 +1742,7 @@ call_nif_schedule(_,_) -> ?nif_stub. call_dirty_nif(_,_,_) -> ?nif_stub. send_from_dirty_nif(_) -> ?nif_stub. call_dirty_nif_exception() -> ?nif_stub. +call_dirty_nif_zero_args() -> ?nif_stub. %% maps is_map_nif(_) -> ?nif_stub. |