The Assembler shows that @lib and @lib[0] are exactly same thing. The problem is in lua52.pas, which I am still tracing. Now the most strange thing is why one of my two programs caused SIGSEGV while another one using same code block does not? Is it because one of them is gui program and the other is cli?
I will post a debug report of assembly call points for these 2 programs on both Linux-64 and Win-32 platforms. Thanks, Shannon 在 六, 12月 29, 2012 at 12:26 上午,leledumbo <[email protected]> 写道: Pointer and dynamic array are not the same, even though dynamic array is built on top of pointer (to a structure). When you pass a dynamic array variable, you're passing pointer TO THE STRUCTURE, NOT THE DATA. To correctly do it, you have to pass pointer to the first data, which is @lib[0] in your case. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-SEGFAULT-difference-between-pointer-and-dynarray-tp4028296p4028297.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
