fix 64-bit issues in the garbage collection
fix 64-bit issues in the garbage collection

We discovered that if a single Erlang process tried to grow above 32
GB (i.e., more 64-bit words than can be counted by a 32-bit number),
the VM failed to find the next larger heap size, even though there
were plenty more heap sizes left to pick from and even though we had a
lot more memory available on the machine. (Obviously, this is only
applicable on 64-bit Erlang.)

It turned out to be due to some 'int' variables in the heap resizing
parts of erl_gc.c not being properly updated to 'Uint' or 'Sint'. Once
that was fixed, I got segfaults instead as soon as the heap got larger
than 2^32 words, due to even more 'int' declarations in the same file,
but now in the GC code.

After fixing this as well, I successfully ran an Erlang node in which
a single Erlang process had a heap so large that I'm not at liberty to
divulge the exact size, but I think the scientific term is
"humongous", and I'm confident that there are no further immediate
problems with very very large individual process heaps.

lianghaivv/otp,hairyhum/otp,electricimp/otp,vladdu/otp,erlang/otp,getong/otp,saleyn/otp,krishnakumar4a4/otp,RJ/otp,vinoski/otp,jinshana/otp,goertzenator/otp,isvilen/otp,sitexa/otp,klarna/otp,RGafiyatullin/otp,goertzenator/otp,lightcyphers/otp,jemsbhai/otp,ahmedshafeeq/otp,matwey/otp,lianghaivv/otp,ferd/otp,platinumthinker/otp,VincentHHL/otp,VincentHHL/otp,paladim/otp,g-andrade/otp,getong/otp,RichMorin/otp,haguenau/otp,palas/otp,matwey/otp,uabboli/otp,RoadRunnr/otp,tuncer/otp,derek121/otp,sdebnath/otp,rlipscombe/otp,ahmedshafeeq/otp,NOMORECOFFEE/otp,jamesruan/otp,vinoski/otp,klarna/otp,matwey/otp,tuncer/otp,potatosalad/otp,saleyn/otp,kvakvs/otp,fenollp/otp,basho/otp,paulcager/otp,yangchengjian/otp,riverrun/otp,palas/otp,lemenkov/otp,platinumthinker/otp,johanclaesson/otp,lrascao/otp,lantti/otp,rlipscombe/otp,RJ/otp,enikki/otp,paladim/otp,potatosalad/otp,psyeugenic/otp,bjorng/otp,lightcyphers/otp,paulcager/otp,bsmr-erlang/otp,cnbin/otp,gjaldon/otp,cobusc/otp,falkevik/otp,lrascao/otp,Teino1978-Corp/otp,entropiae/otp,jinshana/otp,riverrun/otp,vladdu/otp,awetzel/otp,dumbbell/otp,derek121/otp,benoitc/otp-1,mujiatong/otp,benoitc/otp-1,lantti/otp,emile/otp,RGafiyatullin/otp,riverrun/otp,cnbin/otp,awetzel/otp,vinoski/otp,rlipscombe/otp,uabboli/otp,RGafiyatullin/otp,dumbbell/otp,marquisthunder/otp,jj1bdx/otp,VincentHHL/otp,gjaldon/otp,mikpe/otp,jamesruan/otp,krishnakumar4a4/otp,c-rack/otp,uabboli/otp,legoscia/otp,enikki/otp,platinumthinker/otp,beni55/otp,lantti/otp,tuncer/otp,enikki/otp,schlagert/otp,sdebnath/otp,RaimoNiskanen/otp,RoadRunnr/otp,lianghaivv/otp,emile/otp,electricimp/otp,cobusc/otp,GinjaNinja32/otp,mikpe/otp,gjaldon/otp,NOMORECOFFEE/otp,lucafavatella/otp,tuncer/otp,lightcyphers/otp,RichMorin/otp,derek121/otp,bugs-erlang-org/otp,g-andrade/otp,stolen/otp,mikpe/otp,msantos/otp,fenollp/otp,emile/otp,jj1bdx/otp,bjorng/otp,gjaldon/otp,isvilen/otp,ahmedshafeeq/otp,erlang/otp,jj1bdx/otp,dgud/otp,erlang/otp,getong/otp,neeraj9/otp,sitexa/otp,lianghaivv/otp,vladdu/otp,lightcyphers/otp,vic/otp,derek121/otp,RoadRunnr/otp,mikpe/otp,g-andrade/otp,vladdu/otp,lhslll/otp,entropiae/otp,legoscia/otp,aboroska/otp,bugs-erlang-org/otp,ader1990/otp,sammoth-wazoku/otp,massemanet/otp,RoadRunnr/otp,rlipscombe/otp,ferd/otp,entropiae/otp,haguenau/otp,VincentHHL/otp,getong/otp,cnbin/otp,ferd/otp,bugs-erlang-org/otp,legoscia/otp,bsmr-erlang/otp,theom/otp,lantti/otp,jinshana/otp,hairyhum/otp,sdebnath/otp,isvilen/otp,rlipscombe/otp,fenollp/otp,emile/otp,beni55/otp,saleyn/otp,Teino1978-Corp/otp,palas/otp,ferd/otp,potatosalad/otp,weisslj/otp,emacsmirror/erlang,gjaldon/otp,NOMORECOFFEE/otp,weisslj/otp,benoitc/otp-1,vladdu/otp,RichMorin/otp,vladdu/otp,weisslj/otp,palas/otp,ader1990/otp,release-project/otp,sitexa/otp,palas/otp,erlang/otp,palas/otp,bernardd/otp,RaimoNiskanen/otp,ader1990/otp,emacsmirror/erlang,RichMorin/otp,bjorng/otp,lianghaivv/otp,lightcyphers/otp,Teino1978-Corp/erlang-otp,schlagert/otp,ferd/otp,johanclaesson/otp,entropiae/otp,lemenkov/otp,falkevik/otp,matwey/otp,Teino1978-Corp/otp,RoadRunnr/otp,riverrun/otp,dgud/otp,lucafavatella/otp,RoadRunnr/otp,jemsbhai/otp,hairyhum/otp,release-project/otp,beni55/otp,bernardd/otp,emacsmirror/erlang,lrascao/otp,ader1990/otp,paladim/otp,msantos/otp,RichMorin/otp,hairyhum/otp,dumbbell/otp,release-project/otp,NOMORECOFFEE/otp,jemsbhai/otp,kvakvs/otp,bjorng/otp,lhslll/otp,paladim/otp,lianghaivv/otp,johanclaesson/otp,isvilen/otp,RaimoNiskanen/otp,RJ/otp,isvilen/otp,dgud/otp,RaimoNiskanen/otp,dumbbell/otp,c-rack/otp,potatosalad/otp,dumbbell/otp,enikki/otp,falkevik/otp,platinumthinker/otp,riverrun/otp,VincentHHL/otp,release-project/otp,cobusc/otp,bjorng/otp,platinumthinker/otp,Teino1978-Corp/otp,massemanet/otp,RGafiyatullin/otp,vinoski/otp,c-rack/otp,emacsmirror/erlang,gjaldon/otp,emacsmirror/erlang,lemenkov/otp,g-andrade/otp,derek121/otp,c-rack/otp,goertzenator/otp,paladim/otp,ahmedshafeeq/otp,vinoski/otp,saleyn/otp,stolen/otp,VincentHHL/otp,lhslll/otp,neeraj9/otp,lhslll/otp,saleyn/otp,lucafavatella/otp,vic/otp,schlagert/otp,beni55/otp,mikpe/otp,palas/otp,mujiatong/otp,Teino1978-Corp/otp,lightcyphers/otp,c-rack/otp,vic/otp,sitexa/otp,sitexa/otp,RJ/otp,ahmedshafeeq/otp,Teino1978-Corp/otp,yangchengjian/otp,neeraj9/otp,ahmedshafeeq/otp,sammoth-wazoku/otp,vladdu/otp,legoscia/otp,lhslll/otp,electricimp/otp,cobusc/otp,sitexa/otp,RichMorin/otp,aboroska/otp,g-andrade/otp,bjorng/otp,goertzenator/otp,lemenkov/otp,ader1990/otp,emacsmirror/erlang,erlang/otp,fenollp/otp,awetzel/otp,jinshana/otp,riverrun/otp,emile/otp,Teino1978-Corp/erlang-otp,stolen/otp,sdebnath/otp,jemsbhai/otp,bjorng/otp,Teino1978-Corp/erlang-otp,RJ/otp,bugs-erlang-org/otp,lrascao/otp,theom/otp,GinjaNinja32/otp,msantos/otp,cnbin/otp,vic/otp,jemsbhai/otp,gjaldon/otp,getong/otp,RaimoNiskanen/otp,rlipscombe/otp,falkevik/otp,tuncer/otp,marquisthunder/otp,falkevik/otp,g-andrade/otp,weisslj/otp,tuncer/otp,basho/otp,saleyn/otp,erlang/otp,lemenkov/otp,jamesruan/otp,awetzel/otp,kvakvs/otp,aboroska/otp,ahmedshafeeq/otp,erlang/otp,legoscia/otp,theom/otp,klarna/otp,electricimp/otp,psyeugenic/otp,jinshana/otp,RaimoNiskanen/otp,mujiatong/otp,hairyhum/otp,msantos/otp,mikpe/otp,jamesruan/otp,release-project/otp,massemanet/otp,benoitc/otp-1,RaimoNiskanen/otp,emacsmirror/erlang,cobusc/otp,bernardd/otp,basho/otp,bernardd/otp,riverrun/otp,mikpe/otp,goertzenator/otp,jj1bdx/otp,RaimoNiskanen/otp,GinjaNinja32/otp,neeraj9/otp,paulcager/otp,stolen/otp,benoitc/otp-1,rlipscombe/otp,jj1bdx/otp,bernardd/otp,cobusc/otp,awetzel/otp,fenollp/otp,lrascao/otp,potatosalad/otp,awetzel/otp,yangchengjian/otp,johanclaesson/otp,c-rack/otp,bernardd/otp,sitexa/otp,lucafavatella/otp,Teino1978-Corp/otp,marquisthunder/otp,getong/otp,RoadRunnr/otp,dgud/otp,emile/otp,lantti/otp,aboroska/otp,haguenau/otp,uabboli/otp,uabboli/otp,erlang/otp,vic/otp,g-andrade/otp,NOMORECOFFEE/otp,weisslj/otp,lrascao/otp,derek121/otp,psyeugenic/otp,rlipscombe/otp,Teino1978-Corp/erlang-otp,ahmedshafeeq/otp,electricimp/otp,bugs-erlang-org/otp,mikpe/otp,VincentHHL/otp,dumbbell/otp,lrascao/otp,getong/otp,enikki/otp,electricimp/otp,msantos/otp,fenollp/otp,dgud/otp,jj1bdx/otp,msantos/otp,lianghaivv/otp,saleyn/otp,lemenkov/otp,stolen/otp,kvakvs/otp,derek121/otp,sammoth-wazoku/otp,weisslj/otp,lhslll/otp,c-rack/otp,mujiatong/otp,benoitc/otp-1,lucafavatella/otp,krishnakumar4a4/otp,basho/otp,massemanet/otp,ader1990/otp,platinumthinker/otp,bernardd/otp,rlipscombe/otp,cnbin/otp,sammoth-wazoku/otp,bjorng/otp,aboroska/otp,RoadRunnr/otp,falkevik/otp,aboroska/otp,falkevik/otp,jj1bdx/otp,lantti/otp,entropiae/otp,krishnakumar4a4/otp,rlipscombe/otp,jamesruan/otp,RGafiyatullin/otp,fenollp/otp,theom/otp,g-andrade/otp,GinjaNinja32/otp,emacsmirror/erlang,Teino1978-Corp/erlang-otp,bsmr-erlang/otp,dumbbell/otp,release-project/otp,massemanet/otp,riverrun/otp,vladdu/otp,bugs-erlang-org/otp,lantti/otp,klarna/otp,potatosalad/otp,lrascao/otp,legoscia/otp,jinshana/otp,schlagert/otp,paulcager/otp,Teino1978-Corp/erlang-otp,haguenau/otp,aboroska/otp,marquisthunder/otp,benoitc/otp-1,dumbbell/otp,platinumthinker/otp,jamesruan/otp,potatosalad/otp,beni55/otp,vinoski/otp,bsmr-erlang/otp,basho/otp,psyeugenic/otp,yangchengjian/otp,ahmedshafeeq/otp,schlagert/otp,klarna/otp,gjaldon/otp,marquisthunder/otp,krishnakumar4a4/otp,paulcager/otp,sdebnath/otp,bjorng/otp,klarna/otp,massemanet/otp,jemsbhai/otp,mujiatong/otp,kvakvs/otp,lianghaivv/otp,palas/otp,potatosalad/otp,stolen/otp,GinjaNinja32/otp,bernardd/otp,mujiatong/otp,schlagert/otp,sammoth-wazoku/otp,marquisthunder/otp,stolen/otp,getong/otp,jemsbhai/otp,bsmr-erlang/otp,bugs-erlang-org/otp,emacsmirror/erlang,schlagert/otp,johanclaesson/otp,johanclaesson/otp,dgud/otp,mikpe/otp,mujiatong/otp,electricimp/otp,potatosalad/otp,fenollp/otp,RichMorin/otp,awetzel/otp,yangchengjian/otp,erlang/otp,lemenkov/otp,hairyhum/otp,RGafiyatullin/otp,schlagert/otp,theom/otp,haguenau/otp,benoitc/otp-1,enikki/otp,matwey/otp,cobusc/otp,kvakvs/otp,kvakvs/otp,kvakvs/otp,vinoski/otp,beni55/otp,weisslj/otp,isvilen/otp,massemanet/otp,Teino1978-Corp/erlang-otp,bugs-erlang-org/otp,ader1990/otp,bsmr-erlang/otp,lhslll/otp,RoadRunnr/otp,lucafavatella/otp,emile/otp,electricimp/otp,RJ/otp,dgud/otp,sdebnath/otp,ferd/otp,jj1bdx/otp,klarna/otp,getong/otp,basho/otp,matwey/otp,kvakvs/otp,psyeugenic/otp,lucafavatella/otp,release-project/otp,weisslj/otp,vladdu/otp,msantos/otp,tuncer/otp,ader1990/otp,RJ/otp,jinshana/otp,isvilen/otp,entropiae/otp,jinshana/otp,g-andrade/otp,goertzenator/otp,neeraj9/otp,jj1bdx/otp,basho/otp,electricimp/otp,bsmr-erlang/otp,saleyn/otp,GinjaNinja32/otp,jamesruan/otp,mujiatong/otp,vic/otp,massemanet/otp,beni55/otp,tuncer/otp,legoscia/otp,isvilen/otp,bjorng/otp,jemsbhai/otp,ferd/otp,cobusc/otp,erlang/otp,cnbin/otp,Teino1978-Corp/erlang-otp,platinumthinker/otp,vinoski/otp,psyeugenic/otp,vinoski/otp,dgud/otp,lightcyphers/otp,potatosalad/otp,lrascao/otp,massemanet/otp,bsmr-erlang/otp,lucafavatella/otp,krishnakumar4a4/otp,vinoski/otp,fenollp/otp,haguenau/otp,yangchengjian/otp,enikki/otp,krishnakumar4a4/otp,isvilen/otp,paulcager/otp,marquisthunder/otp,neeraj9/otp,entropiae/otp,aboroska/otp,matwey/otp,RGafiyatullin/otp,dumbbell/otp,aboroska/otp,theom/otp,VincentHHL/otp,RichMorin/otp,Teino1978-Corp/otp,basho/otp,sdebnath/otp,NOMORECOFFEE/otp,paladim/otp,jj1bdx/otp,derek121/otp,sammoth-wazoku/otp,msantos/otp,saleyn/otp,klarna/otp,emile/otp,neeraj9/otp,haguenau/otp,GinjaNinja32/otp,ferd/otp,lantti/otp,stolen/otp,release-project/otp,sammoth-wazoku/otp,hairyhum/otp,theom/otp,RaimoNiskanen/otp,goertzenator/otp,vic/otp,tuncer/otp,c-rack/otp,bsmr-erlang/otp,johanclaesson/otp,entropiae/otp,RGafiyatullin/otp,emile/otp,dgud/otp,sammoth-wazoku/otp,vic/otp,awetzel/otp,goertzenator/otp,psyeugenic/otp,legoscia/otp,paladim/otp,NOMORECOFFEE/otp,g-andrade/otp,sdebnath/otp,enikki/otp,theom/otp,basho/otp,falkevik/otp,sitexa/otp,ferd/otp,cnbin/otp,yangchengjian/otp,bernardd/otp,beni55/otp,neeraj9/otp,emacsmirror/erlang,lemenkov/otp,psyeugenic/otp,legoscia/otp,NOMORECOFFEE/otp,hairyhum/otp,marquisthunder/otp,cnbin/otp,matwey/otp,isvilen/otp,haguenau/otp,weisslj/otp,mikpe/otp,paulcager/otp,uabboli/otp,lhslll/otp,lightcyphers/otp,GinjaNinja32/otp,yangchengjian/otp,uabboli/otp,krishnakumar4a4/otp,jamesruan/otp,dgud/otp,paladim/otp,uabboli/otp,goertzenator/otp,uabboli/otp,paulcager/otp,johanclaesson/otp,falkevik/otp,release-project/otp,RJ/otp,matwey/otp,getong/otp,dumbbell/otp