I "solved" this by replacing lines 117-121 in libpng
's pngpriv.h
:
# ifdef __ARM_NEON__
# define PNG_ARM_NEON_OPT 2
# else
# define PNG_ARM_NEON_OPT 0
# endif
by
#define PNG_ARM_NEON_OPT 0
This disables ARM's NEON optimizations, which seems to be the cause of the problem.
This is merely a workaround though, I didn't have time to investigate the real cause of the problem further.