On 2022-10-28 21:19, Đoàn Trần Công Danh wrote:
Bisecting shows that fdd27053, (Fix zdump undefined behavior if !USE_LTZ, 2022-10-26) is the first bad commit, reverting fdd27053 indeeds fix the problem for me.
Thanks for the bug report. It's a portability bug in zdump's tzalloc emulation, on platforms where tzcode thinks the system lacks tm_zone. I see two problems here. First, tzcode wrongly thinks musl lacks tm_zone, and this hurts performance; second and more seriously (because it hurts correctness), on platforms lacking tm_zone zdump's tzalloc emulation returns a null pointer where it should return nonnull. Please try either or both of the first two of the attached patches, which I have installed into the development repository. (The third patch just fixes commentary.) Or you can build 2022f with no patches, by compiling with 'make CFLAGS="-DTM_ZONE=tm_zone -DTM_GMTOFF=tm_gmtoff"'. (On old-fashioned runtimes that lack tm_zone you should be able to work around the problem by compiling with 'make CFLAGS="-DHAVE_SETENV=0"', but this shouldn't be needed with musl unless your musl is pretty old.)