[tz] [YBA] TLD make using mawk causes malloc failure

Jonathan Ben Avraham yba at tkos.co.il
Wed Jan 19 10:12:19 UTC 2022

Dear colleagues,
I noticed that on all tz versions up to 2021e running make in the top-level 
directory results in a malloc failure on Debian 10 which uses the mawk 
alternate for awk:

cc -DTZDIR='"/usr/share/zoneinfo"'    -c -o difftime.o difftime.c
rm -f libtz.a
ar -rc libtz.a localtime.o asctime.o difftime.o strftime.o
: libtz.a
awk -v DATAFORM=`expr main.zi : '\(.*\).zi'` -f ziguard.awk \
 	  africa antarctica asia australasia europe northamerica southamerica etcetera factory backward  >main.zi.out
malloc(): unsorted double linked list corrupted
make: *** [Makefile:612: main.zi] Error 134

This can be corrected by installing gawk and running

     update-alternatives --config awk

to select gawk as the awk alternate. I verified that the make completes without 
error using either GNU Awk 4.1.4, or GNU Awk 4.2.1.

I did not see any warning about this in any of the NEW or README files, which is 
unfortunate as I spent several hours of my employers time understanding the 
problem and I suspect that others have seen this already. I suggest adding an 
INSTALL readme to say which environments are known to work and if there are 
specific know issues such as mawk.

Best regards,

  - yba

  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm

More information about the tz mailing list