[erlang-bugs] Bug in enif_compare/2 for bignums

Paul Davis <>
Wed Aug 31 20:20:54 CEST 2011


I think I've uncovered a bug in enif_compare/2 for bignums. Converting
the same arguments to ErlNifSInt64 values and using C comparison
returns the correct result when enif_compare does not. There's a
reduced test case at [1]. If there's nothing obvious I'll spend some
time later digging into Erlang to see if I can spot the bug.

Paul Davis

[1] https://github.com/davisp/enif_cmp_bug

More information about the erlang-bugs mailing list