Defense companies, which have suffered mightily on the stock markets of late, took a sharp upturn, led by General Dynamics Corp.…