[Numpy-discussion] bus error in embedded numpy
pav at iki.fi
Fri Nov 13 18:10:46 EST 2009
pe, 2009-11-13 kello 22:36 +0100, Sturla Molden kirjoitti:
> > I was aware of this - I thought I would be OK on the mac - at least
> > Python and Numpy and my mex function are built with apple gcc although
> > I'm not sure about Matlab. I guess Windows will be more difficult...
> > But in any case I don't plan to pass any file handles around.
> It applies to any CRT resource, not just files. Compiler is not
> important, but which CRT is loaded. And if you statically link the same
> CRT twice, that becomes two CRTs that cannot share resources. In
> Windows, Microsoft has made sure there are multiple versions of their
> CRT (msvcrt.dll, msvcr71.dll, msvcr80.dll, msvcr90.dll, ...) that cannot
> share resources. And anyone not careful with this can experice crashes
> at random locations.
Well, for Matlab/Python integration meant for numerical computations I
would be surprised if CRT is really a problem. You essentially can pass
data to Matlab only via Matlab's own interface -- CRT stuff like
ownership of pointers to allocated memory, file handles etc. typically
do not cross this boundary.
More information about the NumPy-Discussion