site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=aZN0koHKK8TISrB0Dnio18dj5q9UM+pxiZxzI66CWVo=; b=v12el9tkqPfoFOKypRGZH2s+7afZ8q93LxKF9SX/UTf8xQwGtDya41trOsphxG+PIQ 9Eh/9J9qw+sigth99BnDNWrVbcRbVspNECMy03w5OW+JJTPpOH3VUYr2Flj7+ttIQbDd h/pZVTbG/Bw2WlGV2sifaeTuPxn9qiobVo0Mw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nW3FJN6YkilZ+HxsJyIpKJ3zZoUfUAlU0IgAY22uu4lzzdzlZiZyT5oS3tfZTta7kG K0wAgy5IQYm3hr3x2EhPXEnO6Sl8P28/1plOAfyiVg1ukzSiOhRjVuyxLdiFXnmI70Yy jV8581Qtskqj02FAPR3uzhJ/CtV61EUyU+4tA= Make sure that the AMD64 ABI Red Zone is disabled. I found that it wasn't in my 64-bit build, even though it is documented to be set when -mkernel is enabled. Just try rebuilding your kext with -mno-red-zone I filed a bug with Apple, and got a really snarky reply telling me that Xcode was working as designed, and that there was no bug. This gentleman closed the bug without even investigating. But in my experience the bug persisted, and I had to use -mno-red-zone even though I shouldn't have had to. The AMD64 Red Zone is a 128-byte area below the stack pointer that may not be touched by signal or interrupt handlers. It gives leaf functions some local storage without the runtime and code size of decrementing the stack pointer. (Yes, Really.) While a really scary optimization, it works well provided everyone agrees to either respect it, or not use it at all if it's not respected. The Snow Leopard 64-bit kernel doesn't respect the Red Zone, so you have to disable it in your build. That snarky engineer told me that it was disabled in *my* build, but it clearly wasn't until I added -mno-red-zone. (The Linux kernel doesn't respect it either.) Mike -- Michael David Crawford mdcrawford at gmail dot com GoingWare's Bag of Programming Tricks http://www.goingware.com/tips/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com