When compiling php with x86-64-v3 everything works fine. But as soon as I enable the ioncube loader, and process a addslashes function, I get memory corruption due to it clobbering the sse registers via the sse4.2 instructions, If I manually add mmx save/restore in the addslashes function, things work again like normal. This shows the ioncube loader is also using the mmx/sse registers without being safe when calling back into php functions that may or may not be also using them. php[2729078] general protection fault ip:566336 sp:7ffed56bd1a0 error:0 in php[400000+329000] the gdb backtraces always show ioncube in the stack path calling zend_hash_* functions when it dies, but wrapping the addslashes function has caused the issue to go away when using ioncube.