fix hipe_bifs_alloc_data_2 to avoid "Yikes!" warning
fix hipe_bifs_alloc_data_2 to avoid "Yikes!" warning

It's been reported that HiPE-enabled Erlang VMs running on BSD
systems sometimes generate messages like

Yikes! erts_alloc() returned misaligned address 0x8016a512c

These originate from hipe_bif0.c:hipe_bifs_alloc_data_2().

A native code module has an associated data area of some
size and alignment.  In the case where the size is zero,
the alignment is irrelevant, but the allocation BIF checks
it anyway.  The warning then triggers on systems where
malloc(0) returns blocks with less alignment than we
(erroneously) expected.

The fix is to simply skip the allocation in this case and
return NULL.  The loader won't actually use the address in
this case so that's safe.  This is also an optimization since
it avoids allocating memory that cannot be used, and it avoids
fragmenting the system heap with useless tiny blocks.

A second problem is that the warning message failed to
identify its origin.  Fixed by prefixing the message by
the BIF's name rather than the silly Yikes! string.

Tested and confirmed to solve the original reporter's problem.

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