By the way, the crashes still happen with autofs-5.1.5 as well. The preprocessed source in my previous mail was from autofs-5.1.5.
The full compile line was: gcc -shared -g -O2 -fdebug-prefix-map=/root/build/autofs/autofs-5.1.5=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc -DSSS_LIB_DIR=\"/usr/lib/hppa-linux-gnu/sssd/modules\" -I../include -I../lib -fPIC -D_GNU_SOURCE -DAUTOFS_LIB_DIR=\"/usr/lib/hppa-linux-gnu/autofs\" -DAUTOFS_MAP_DIR=\"/etc\" -o parse_sun.so parse_sun.c ../lib/autofs.a -lpthread -ltirpc -lrt