Core dump with pattern '(^| )*( |$)'

$ ./grep -Eq '(^| )*( |$)' 
Segmentation Fault

$ ./grep -E '(^| )*(a|b)*(c|d)*( |$)'
Segmentation Fault
