Closed kalibannez closed 5 years ago
Thank you I'm going to fix it
I fixed it But I only tested on windows and android. I will test on Mac few days ago Please try it.
https://github.com/effekseer/EffekseerForCocos2d-x/commit/be5f2695994e69c28ef5f2f936d27a1480b05ca5
Fixed it
Now it works on Mac, thank you!
Hi, I think that i found bug in
inline void TransformVertexes( Vertex* vertexes, int32_t count, const ::Effekseer::Matrix43& mat )
function in EFK_SSE2 section. When i debugging my game with enabled Address Sanitizer under OS X with cocos2d-x effekseer, i'm getting following error: `================================================================= ==69543==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffeefbf9263 at pc 0x0001037887f3 bp 0x7ffeefbf8870 sp 0x7ffeefbf8868 READ of size 16 at 0x7ffeefbf9263 thread T00 0x1037887f2 in EffekseerRendererGL::TransformVertexes(EffekseerRendererGL::Vertex*, int, Effekseer::Matrix43 const&) EffekseerRendererNative.cpp:849
I think, the reason of that is _mm_loadu_ps function works with four values (as described there https://software.intel.com/en-us/node/524260), but TransformVertexes function corresponding Matrix43 matrix. I mean, that call
_mm_loadu_ps( mat.Value[0] )uses mat.Value[0][0], mat.Value[0][1], mat.Value[0][2], mat.Value[1][0], call
_mm_loadu_ps( mat.Value[1] )uses mat.Value[1][0], mat.Value[1][1], mat.Value[1][2], mat.Value[2][0] and so on. And
_mm_loadu_ps( mat.Value[3] )` approach stack overflow.Could you fix it, please?