CVS_MAX_DEPTH check optimized away
When using the Makefile unchanged to build the project on Archlinux, I got this crash on certain files:
*** stack smashing detected ***: <unknown> terminated
Valgrind shows this stacktrace:
==795== Process terminating with default action of signal 6 (SIGABRT): dumping core
==795== at 0x48ADD7F: raise (in /usr/lib/libc-2.28.so)
==795== by 0x4898671: abort (in /usr/lib/libc-2.28.so)
==795== by 0x48F0877: __libc_message (in /usr/lib/libc-2.28.so)
==795== by 0x4983414: __fortify_fail_abort (in /usr/lib/libc-2.28.so)
==795== by 0x49833C5: __stack_chk_fail (in /usr/lib/libc-2.28.so)
==795== by 0x10F269: yylex (in /home/migrator/cvs-fast-export/cvs-fast-export)
==795== by 0x10CA2C: yyparse (in /home/migrator/cvs-fast-export/cvs-fast-export)
==795== by 0x110538: rev_list_file.isra.0 (in /home/migrator/cvs-fast-export/cvs-fast-export)
==795== by 0x1106D8: worker (in /home/migrator/cvs-fast-export/cvs-fast-export)
==795== by 0x485CA9C: start_thread (in /usr/lib/libpthread-2.28.so)
==795== by 0x4971B22: clone (in /usr/lib/libc-2.28.so)
When compiling without -O3, the following message appears:
revision too long, increase CVS_MAX_DEPTH