Konstantin Barskiy
-
2009-11-30
Invalid None -> Null Pointer cast on AMD64
Brought to you by:
theller
PointerType_from_param converts None value to Int. It's later makes ffi to put 32-bit integer on stack instead of 64-bit pointer. And that leads to crash...
Example to reproduce bug attached. It fails with:
python: bug.cpp:28: void foo(int, bar*, int, bar*, int, bar*, int, bar*, int, bar*): Assertion `d_ptr == 0' failed.