@junmin-zhu According to the deleted comments, we test the invalid chars only in shared mode to  avoid heavy operation.
Now the process for invalid chars was changed, if we meet invalid chars, the process will be stopped, the verification is not too heavy any more, so I remove this condition.