Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
[SOLVED]KEXTs & Altivec stack corruption
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED]KEXTs & Altivec stack corruption



I have somewhat solved my problem with stack corruption. It seems that some AltiVec-less sources compiled with the -faltivec flag can have bad side effects. What happens with some of these sources is that the compiler creates four functions (saveVEC, restVEC, saveVEC_vr11, restVEC_vr10). Some of my functions in the sources will have calls to these (usually saveVEC_vr11 and restVEC_vr10) inserted into them. These new functions are what seem to be corrupting the stack.

So my solution was to compile all non-AltiVec sources without the -faltivec flag and the AltiVec sources with it. This prevented the extra functions from being created and inserted into my functions. And lots of testing has shown the AltiVec code running very well without problems in my KEXT with this method.

I'd be interested to know why these functions are created and inserted into other functions (so far functions with no vector types or instructions). It's definitely a GCC problem.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.