On the variation of stress along the front of cracks and surface flaws