I found that the segmentation fault occurs in optimized code (-O2). It does not happen when optimization is turned off. I am not sure what exactly happened but mke2fs is now able to get past that point.
The command now fails at a different point:
ext2fs_mkdir: EXT2 directory corrupted while creating /lost+found
Tracing from the ext2fs_mkdir() function, I found that the code returns an error here:
ext2fs_read_dir_block3(): returns EXT2_ET_DIR_CORRUPTED
Any thoughts or ideas on this issue will be very helpful.