<html><head></head><body><div>Hi Paul,</div><div class="-x-evo-signature-wrapper"><span><pre><br></pre></span></div><div>On Wed, 2016-02-17 at 22:26 +0100, Paul Gevers wrote:</div><blockquote type="cite"><pre>Hmm, I was a tiny little bit wrong earlier.

I modified hedgewars a tiny bit (patch attached) and build in on
debomatic¹. You can see that the failing line reads:
"Lua test file specified: /<<PKGBUILDDIR>>/tests/lua/hellfire_burns.lua"
</pre></blockquote><div>...</div><blockquote type="cite"><pre>
Anyways, it now fails for an access violation. I don't like this at all,
but it is hard to say if this is a fpc error or hedgewars'.</pre></blockquote><div>I've tried some simpler code and it looks like the compilation options used by hedgewars cause the issue. I don't know if this is normal or not but at least we know now that it is not an issue in the code itself but rather in the compilation flags.</div><div><br></div><div>I'm copying FPC core in case some one can help with the impact of the used compilation flags.</div><div><br></div><div>Here are my experimentation:</div><div>I first created very small programs:</div><div><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ cat test1.pas </pre><pre>program test;</pre><pre>begin</pre><pre>    WriteLn('Hello');</pre><pre>end.</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ cat test2.pas </pre><pre>program test;</pre><pre>begin</pre><pre>    WriteLn(stdout, 'Hello');</pre><pre>end.</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ </pre><div><br></div><div>I first compile using no special flags and both programs execute well:</div></div><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc test1</pre><pre>Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm</pre><pre>Copyright (c) 1993-2015 by Florian Klaempfl and others</pre><pre>Target OS: Linux for ARMEL</pre><pre>Compiling test1.pas</pre><pre>Assembling test</pre><pre>Linking test1</pre><pre>/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?</pre><pre>4 lines compiled, 0.3 sec</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test1</pre><pre>Hello</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc test2</pre><pre>Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm</pre><pre>Copyright (c) 1993-2015 by Florian Klaempfl and others</pre><pre>Target OS: Linux for ARMEL</pre><pre>Compiling test2.pas</pre><pre>Assembling test</pre><pre>Linking test2</pre><pre>/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?</pre><pre>4 lines compiled, 0.3 sec</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test2</pre><pre>Hello</pre><pre><br></pre><div>Now, we use a subset of compilation flags from hedgewars and we can just reproduce the issue on second program but not the first one:</div><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc -FU/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars/CMakeFiles/hwengine.dir -k-rpath -k'\$ORIGIN/../lib/:\$ORIGIN/:/usr/lib/hedgewars/lib/' -FD/usr/bin -Cs2000000 -fPIC -Fl/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/bin -k-L/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -XLAlua=lua5.1 -Fl/usr/lib/arm-linux-gnueabi/libphysfs.so -O2 -g -gl -gp   -dUSE_VIDEO_RECORDING -dPNG_SCREENSHOTS -dSDL_MIXER_NEWER -dSDL_IMAGE_NEWER -dDEBUGFILE  test1    </pre><pre>Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm</pre><pre>Copyright (c) 1993-2015 by Florian Klaempfl and others</pre><pre>Target OS: Linux for ARMEL</pre><pre>Compiling test1.pas</pre><pre>Assembling test</pre><pre>Linking test1</pre><pre>/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?</pre><pre>4 lines compiled, 0.3 sec</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test1</pre><pre>Hello</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc -FU/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars/CMakeFiles/hwengine.dir -k-rpath -k'\$ORIGIN/../lib/:\$ORIGIN/:/usr/lib/hedgewars/lib/' -FD/usr/bin -Cs2000000 -fPIC -Fl/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/bin -k-L/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -XLAlua=lua5.1 -Fl/usr/lib/arm-linux-gnueabi/libphysfs.so -O2 -g -gl -gp   -dUSE_VIDEO_RECORDING -dPNG_SCREENSHOTS -dSDL_MIXER_NEWER -dSDL_IMAGE_NEWER -dDEBUGFILE  test2</pre><pre>Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm</pre><pre>Copyright (c) 1993-2015 by Florian Klaempfl and others</pre><pre>Target OS: Linux for ARMEL</pre><pre>Compiling test2.pas</pre><pre>Assembling test</pre><pre>Linking test2</pre><pre>/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?</pre><pre>4 lines compiled, 0.3 sec</pre><pre>(sid_armel-dchroot)<a href="mailto:abou@abel">abou@abel</a>:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test2</pre><pre>Runtime error 103 at $000101C8</pre><pre>  $000101C8  $main,  line 3 of test2.pas</pre><pre><br></pre><div>It is not clear for me why RTE 103 is thrown, in the second case but not in the first one. I'd expect either both work or neither. Also I don't see what is the impact of the compilation flags that are used. Maybe I should perform more experimentations in order to find a smaller subset. but that will be enough for tonight!</div><div><pre>-- 
Cheers,
Abou Al Montacir</pre></div><blockquote type="cite"><pre></pre></blockquote></body></html>