[erlang-bugs] [erlang-questions] Potential bug in OTP_17.0-rc1 when converting map to binary and back

Björn-Egil Dahlberg <>
Tue Feb 4 12:34:25 CET 2014


This bug is now corrected on master with:

commit 9171d1886015e4d36601ed360f6d479a5a95abab
Merge: 52e15d7 9ae4a52
Author: Sverker Eriksson <>
Date:   Mon Feb 3 18:07:09 2014 +0100

     Merge branch 'sverk/erts/binary_to_term-maps-bug'

     * sverk/erts/binary_to_term-maps-bug:
       erts: Fix bug in binary_to_term for maps


// Björn-Egil

On 2014-02-01 19:37, Kostis Sagonas wrote:
> On 02/01/2014 06:41 PM, Gustav Simonsson wrote:
>> After the announcement of OTP_17.0-rc1 I compiled the source and started
>> playing with maps and proper.
>>
>> After testing a bunch of stuff like maps:to_list(maps:from_list(List)) I
>> replicated a classic proper example to verify
>> binary_to_term(term_to_binary(T)).
> > .... <SNIP>
>> 2>  proper:quickcheck(t:prop_maps2(), [{numtests, 10000}]).
>> ............ <SNIP> ...............................................
>> Shrinking .......Segmentation fault (core dumped)
>> .... <SNIP>
>> Please let me know if you need a core and/or more details.
>> It should be easy to replicate given the above code though on various 
>> archs.
>
>
> Indeed, this is very easy to replicate.  On my first attempt, I got 
> equally unlucky as Simon and OTP seg faulted when PropEr attempted to 
> shrink the offending test case. On my second attempt, I had better 
> luck and shrinking worked:
>
> Eshell V6.0  (abort with ^G)
> 1> proper:quickcheck(t:prop_maps2(), 10000).
> ...... <SNIP> .....
> Failed: After 2090 test(s).
> {[{{{},'mö\030?Ø',[],[[]],[]},{'\031¹DZ',75.25615709172015,9}},{{<<47,42,83,2:2>>},[{11.611456128457124,{[]},[],-7.568651682554733}]},{'þ\204HÅð¾óà',[[],[],[],-10,80,{},[]]},{{'Ñ\211l\030x\220Â\224é'},[-14.081931069838275,1,['\236Jñ',0],3,3.8086424574055755]},{{[],[{},[[{}]]],{},{}},{-7.668921456100702,-0.8537275447686942,0.2046413634772726,8.71091095449412,'X7¯³\237\030',{-11,{{}},-0.95809288292835,[{{}},'©uÆ']},-5.604771642421137}},{{[{},22.021800217282916],-2,7.289863377212738,'³]Ã\d',10.348710823806195},{{[[{},[5.428258856857506],[],'O\030:',-2]],22.20548610862955,102}}},{[1.730805378918121,'\201\226o\032',-5,-4,0.21576771814263207],<<145,249,4,86,26,4:3>>}]} 
>
>
> Shrinking ...................(19 time(s))
> {[{{{},'mö\030?Ø',[],[[]],[]},{'\031¹DZ',75.25615709172015,9}},{{<<47,42,83,2:2>>},[{11.611456128457124,{[]},[],-7.568651682554733}]},{'\037\204HÅ>w6²',[[],[],[],-8,80,{},[]]},{{'Ñ\211l\030x\220Â\224é'},[-14.081931069838275,1,['z\003-',0],3,3.8086424574055755]},{'\v¹6\002',{-7.668921456100702,-0.8537275447686942,0.2046413634772726,8.71091095449412,'X7¯³\237\030',{-11,{{}},-0.95809288292835,[{{}},'©uÆ']},-5.604771642421137}},{{[{},22.021800217282916],-2,7.289863377212738,'³]Ã\d',10.348710823806195},{{[[{},[5.428258856857506],[],'O\030:',-2]],22.20548610862955,102}}},{[1.730805378918121,'\030\023%\020',-5,-4,0.21576771814263207],<<145,249,4,49,26,4:3>>}]} 
>
> false
>
> false
>
>
> PropEr can be obtained from: http://proper.softlab.ntua.gr/
>
> Kostis
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs
>



More information about the erlang-bugs mailing list