So about that cleaner patch I mentioned...
Here's the relevant lines in the good old panic log:
Code:
panic(cpu 0 caller 0xffffff80033b3263): "kfree: size 18446743521917493256 > kalloc_largest_allocated 10534912"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4903.200.274.31.2/osfmk/kern/kalloc.c:752
-- snip --
0xffffff8cd4a1bcb0 : 0xffffff80033b3263 mach_kernel : _kfree + 0x103
0xffffff8cd4a1bd00 : 0xffffff8003a101d6 mach_kernel : _IOFree + 0x16
0xffffff8cd4a1bd20 : 0xffffff7f869e0fa5 com.apple.GeForceTesla : __ZN26nvVirtualAddressSpaceTesla4freeEv + 0xbd
In my understanding, the function
nvVirtualAddressSpaceTesla::free() is calling
IOFree() which is calling
kfree(). And it's telling it to free 18446743521917493256 bytes (?) which is wayyyyy too much so it calls
panic().
My previous patch deleted (NOP'ed) the entirety of a function a few lines
below all this in the stack trace, a function
clientClose() which called a function, which called a function, which called the
nvVirtualAddressSpaceTesla::free() function above. Excessive.
My
new patch just NOP's a
single call statement at
nvVirtualAddressSpaceTesla::free() + 183. Seems like that's the call to
IOFree() that causes the panic, since it hasn't panicked yet!
Not sure if this'll fix some of the instability I saw earlier on my MacBook7,1. We'll have to wait and see. For anybody who's curious, replacement
GeForceTesla.kext is attached!