Crash/Freeze in Xcode debugger w/infinite loop
Crash/Freeze in Xcode debugger w/infinite loop
- Subject: Crash/Freeze in Xcode debugger w/infinite loop
- From: Trygve Inda <email@hidden>
- Date: Sun, 23 Apr 2006 10:53:38 +0000
- Thread-topic: Crash/Freeze in Xcode debugger w/infinite loop
I was able to cause Xcode 2.2.1 to freeze with this code:
OSStatus DB_CallbackEndianFlip (OSType dataDomain, OSType dataType, short
id, void *dataPtr, UInt32 dataSize, Boolean isNative, void *refcon)
{
UInt32 count = dataSize >> 2; // number of 4-byte elements
while (--count >= 0) ((long *)dataPtr)[count] = isNative ?
EndianS32_NtoB (((long *)dataPtr)[count]) :
EndianS32_BtoN (((long *)dataPtr)[count]);
return (noErr);
}
Note the bug in count (declared as UInt32 instead of SInt32).
Of course a UInt32 will never be negative so this is an infinite loop. I got
the spinning pizza of doom and then it seemed to overwrite the video buffer
as my screen filled with blue from the bottom up.
Has anyone seen this happen? If it is not already filed, I will file a bug.
It should be able to break out of such conditions w/o having to do a hard
power down.
This is on a MacBook Pro.
Trygve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden