> 1) from the source code of lua52.pas, how do you know the array parameter to luaL_newlib() accepts only static array but not dynamic array?
No, I didn't say that. Only the pointer version is correct. The array version is wrong despite the array type passed, this is due to the pointer addresses being invalid (from one function call to another) maybe. > If you don't read the source code or document of lua API? Lua API is consistent, it uses whatever C provides. Thus it can only accept pointer, since C can only pass that as well. > 2) If the api only accept static array but I passed dynamic array and > hence it crashed, then it is my fault, not FPC compilers. In such case, > shall I still file a bug report? We don't know yet, it's just my investigation. We need people with more knowledge. > 3) Finally, if I still file a bug, can I just ask the reviewer to read > this mail thread as it is archived? Better copy and paste the relevant parts, so the report is concise. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-SEGFAULT-difference-between-pointer-and-dynarray-tp4028296p4028325.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus