Skip to content

Instantly share code, notes, and snippets.

@gdementen
Last active December 17, 2015 19:29
Show Gist options
  • Save gdementen/5661258 to your computer and use it in GitHub Desktop.
Save gdementen/5661258 to your computer and use it in GitHub Desktop.
Crashing Python with numba jit()
import numpy as np
from numba import jit, double, autojit, void
def func(result, a):
for i in range(len(result)):
result[i] = a[i]
func_nb = jit(void[:](double[:], double[:]))(func)
#func_nb = autojit(func)
result = np.empty(10000, dtype=np.float64)
a = np.random.rand(10000)
func_nb(result[:], a[:])
func_nb(result[:], a[:])
C:\Users\gdm\devel\test_numba>python crash.py
0x7737E3BE (0x043CBEB8 0x00000001 0x00461B40 0x043CBEB0), RtlInitUnicodeString() + 0x196 bytes(s)
0x7737E023 (0x00460000 0x00000000 0x043CBEB8 0x0027FCFC), RtlFreeHeap() + 0x7E bytes(s)
0x754414DD (0x00460000 0x00000000 0x043CBEB8 0x80CDD2F7), HeapFree() + 0x14 bytes(s)
0x72E43C1B (0x043CBEB8 0x042F6F90 0x1E0BB009 0x043CBEB8), free() + 0xCD bytes(s)
0x1008DF5D (0x043CBEB8 0x043CBE60 0x0027FDBC 0x024F4A50)
0x1E0BB009 (0x00000002 0x024F4A50 0x00000002 0x00000002), PyTuple_Pack() + 0xA9 bytes(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment