Cracking during solidification is a serious defect in castings and welds. When solidification shrinkage and thermal contraction of the semisolid and its surrounding solid are obstructed, tensile deformation can be induced in the semisolid to cause cracking along grain boundaries that are not fed with sufficient liquid. A criterion for cracking was derived, focusing on events occurring at the grain boundary including separation of grains from each other, lateral growth of grains toward each other, and liquid feeding between grains. An index for the susceptibility of an alloy to cracking during solidification was also proposed, that is, |dT/d(fS1/2)| near (fS)1/2 = 1, where T is temperature and fS the fraction solid in the semisolid. The index affects: (a) the lateral growth rate of two neighboring grains toward each other to bond together to resist cracking, and (b) the length of the grain-boundary liquid channel through which feeding has to occur to resist cracking. The index was verified with experimental data in casting and welding of Al alloys.