The Assembler shows that @lib and @lib[0] are exactly same thing. The problem<div>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?</div><div><br></div><div>I will post a debug report of assembly call points for these 2 programs on both Linux-64 and Win-32 platforms.</div><div><br></div><div>Thanks,</div><div>Shannon</div><div><br>
在 六, 12月 29, 2012 at 12:26 上午,leledumbo <leledumbo_cool@yahoo.co.id> 写道:<br>
<blockquote type="cite">Pointer and dynamic array are not the same, even though dynamic array is
<br>built on top of pointer (to a structure). When you pass a dynamic array
<br>variable, you're passing pointer TO THE STRUCTURE, NOT THE DATA. To
<br>correctly do it, you have to pass pointer to the first data, which is
<br>@lib[0] in your case.
<br>
<br>
<br>
<br>--
<br>View this message in context: <a href="http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-SEGFAULT-difference-between-pointer-and-dynarray-tp4028296p4028297.html">http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-SEGFAULT-difference-between-pointer-and-dynarray-tp4028296p4028297.html</a>
<br>Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.
<br>
<br>--
<br>_______________________________________________
<br>Lazarus mailing list
<br>Lazarus@lists.lazarus.freepascal.org
<br><a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
<br></blockquote><br></div>