Squeak crashes on SuSE Linux 7.3

John M McIntosh johnmci at smalltalkconsulting.com
Wed Sep 17 21:50:15 UTC 2003


Hi, I looked at the sourceforge windows socket code and noted

/ 
************************************************************************ 
*****
   SocketValid: Validate a given SocketPtr
************************************************************************ 
*****/
static int SocketValid(SocketPtr s) {
   if ((s != NULL) &&
       (s->privateSocketPtr != NULL) &&
       (s->sessionID == thisNetSession)) {
     return true;
   } else {
     FAIL();
     return false;
   }
}

This does not check if thisNetSession is null, the error condition will  
not be noticed and
running the code like
void sqSocketDestroy(SocketPtr s)
{
   privateSocketStruct *pss;

   if (!SocketValid(s)) return;

   pss = s->privateSocketPtr;

   /* close the socket if it is open */
   if(pss->s) {
     sqSocketAbortConnection(s);
   }

Will I'd bet cause the VM to crash on the dereference of  
privateSocketPtr, or on some other
call.


On Wednesday, September 17, 2003, at 02:16  PM, Germán Fabregat Llueca  
wrote:

>>
>> Although this bug was also in the earlier macintosh VMs that used
>> OpenTransport never had
>> an issue because the call that used the bad value would fail when we
>> when to OpenTransport
>> with the bad information, versus core dumping. Can't speak for
>> windows...
>>
>
> I have just run my image on a Windows 2000 VM, and it crashes the same  
> way...
>
> I was working with sockets in another project days ago...
> I will check. Thanks for your information.
>
> Regards,
> Germán Fabregat.
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===



More information about the Squeak-dev mailing list