lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



I'm going to put a bet on a compiled code issue with the
compiler optimizing a copy or move incorrectly. Probably
in the memcpy() or memmove() operation.
 
(*many printfs later...*)

Well I'll be. You are officially my new mentor :) You are right, "memcpy" is broken in their library. Probably they try to do memcpy on words instead of bytes to optimize speed, and they ignore alignment. So the memcpy in newlstr (lstring.c) triggered an aligment exception (I don't have any way to actually verify this, but now it's my time to bet that this is the problem, since one of its arguments is not aligned).
Thank you all for your help, and Ralph, very good call!

Best,
Bogdan