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/beam | |
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/beam')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index ede5f335dc..adc3520ebb 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -1646,6 +1646,7 @@ init_nif_sched_data(ErlNifEnv* env, NativeFunPtr direct_fp, NativeFunPtr indirec ep->m = env->mod_nif; ep->fp = indirect_fp; proc->freason = TRAP; + proc->arity = argc; return THE_NON_VALUE; } |