It is shown that the square of a nonconstant harmonic function u that either vanishes continuously on an open subset V contained in the boundary of a Dini domain or whose normal derivative vanishes on an open subset V in the boundary of a C-1,C-1 domain in R-d satisfies the doubling property with respect to balls centered at points Q is an element of V. Under any of the above conditions, the module of the gradient of u is a B-2(d sigma)-weight when restricted to V, and the Hausdorff dimension of the set of points {Q is an element of V : del u(Q) = 0} is less than or equal to d-2. These results are generalized to solutions to elliptic operators with Lipschitz second-order coefficients and bounded coefficients in the lower-order terms. (C) 1997 John Wiley & Sons, Inc.