Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!gatech!mcnc!uvaarpa!mmdf From: eichin@milo.mit.edu (Mark W. Eichin) Newsgroups: comp.lang.perl Subject: recv doesn't widen the read in buffer... Message-ID: <1991Mar24.035130.16585@uvaarpa.Virginia.EDU> Date: 24 Mar 91 03:51:30 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: eichin@milo.mit.edu Organization: The Internet Lines: 18 I've been writing some UDP services... and I keep running into problems with recv. I seem to have missed reporting it. It happens on at least a few architectures. If I have something like: local($data)=""; $addr = recv($service,$data,2000,0); # crashes I get a core dump out of perl. (3.044 and previous crash just about on this line; 4.000beta crashes a few lines later. local($data)="\0" x 2000; $addr = recv($service,$data,2000,0); # works fine... This seems to work, presumably because data is already allocated with enough space. Since I'm giving recv a length, shouldn't it know to grow $data enough to fit? Shouldn't perl *never* core dump? _Mark_ MIT Student Information Processing Board