Brandon Crawford hit a tiebreaking two-run double in the eighth inning, and the Giants broke a seven-game losing streak by rallying past the Marlins 3-1.