The lateral diffusion of zinc and tin in GaAs, during their diffusion through windows in phosphosilicate glass (PSG) masks, has been measured as a function of oxide composition and oxide thickness. Lateral diffusion of zinc extends up to 20 times the junction depth, whereas the lateral diffusion of tin extends up to 500 times the junction depth, interfacial stress between mask and substrate has been shown to be the driving force for the large lateral diffusion. A method of eliminating the stress gradient by using a thin oxide (1000 Å) in the diffusion windows has resulted in reducing the lateral diffusion to less than 2.5 µm, the resolution of the measurement technique, for diffusion with a junction depth of 1 µm. A new method of measuring the expansion coefficients of thin dielectric layers has been presented. The expansion coefficients of PSG films with 0-30% P2O5content by weight have been measured using this method. Further, stresses in PSG films deposited on GaAS have been measured as a function of oxide composition.