Re: [fpc-devel] FPC Android crashes in Tegra CPUs

2014-12-25 Thread Yury Sidorov

Hi,

To find out an offending instruction it is needed to create a simple 
console app. Compile it with the -gl switch and run in the Android 
console. You will get a stack back trace. If the instruction in the RTL, 
it is needed to recompile it with the -O- -g switches.


Yury Sidorov,
j...@cp-lab.com

On 12/25/2014 2:06 AM, peter green wrote:

Sergio Flores wrote:


Eg: Calling lnxp1(x) with x1 results in a SIGILL crash.

.

I've got an Android app in Play Store with around 300 thousand
downloads, and from what I've gathered, this crash happens in any
Tegra based device, and only on those.

AIUI many tegra devices don't support neon, I wonder if a neon
instruction is being used either because of incorrect compiler settings
or because of incorrect inline assembler code.

If this was happening on regular linux i'd suggest using gdb to get a
backtrace and a dissasembly of the sigill location but i'm not sure how
possible that is on andriod or how easy it is to get a suitable tegra
device running regular linux to experiment on.


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] FPC Android crashes in Tegra CPUs

2014-12-24 Thread peter green

Sergio Flores wrote:


Eg: Calling lnxp1(x) with x1 results in a SIGILL crash.

.
I've got an Android app in Play Store with around 300 thousand 
downloads, and from what I've gathered, this crash happens in any 
Tegra based device, and only on those.
AIUI many tegra devices don't support neon, I wonder if a neon 
instruction is being used either because of incorrect compiler settings 
or because of incorrect inline assembler code.


If this was happening on regular linux i'd suggest using gdb to get a 
backtrace and a dissasembly of the sigill location but i'm not sure how 
possible that is on andriod or how easy it is to get a suitable tegra 
device running regular linux to experiment on.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] FPC Android crashes in Tegra CPUs

2014-12-20 Thread Sergio Flores
I've recently discovered that some fpc math functions crash on Tegra CPUs
(ARM7/Android), even when called with valid arguments.

Anyone has a clue what could cause this or possible workarounds?

Eg: Calling lnxp1(x) with x1 results in a SIGILL crash.

I did my own naive implementation of this function in pure pascal without
calling any FPC math function, and it fixed the problem.
However currently I found another crash in the same hardware that points to
fpc_ln_real function, and don't really want to reimplement lots of math
functions.
Probably any function related to logaritms suffers from this,.

Notes - I'm compiling with FPC 2.7.1 (from trunk, but not most recent, I
probably compiled it 2 or 3 months ago). Optimizations are off, due to them
being currently broken in ARM7.

I've got an Android app in Play Store with around 300 thousand downloads,
and from what I've gathered, this crash happens in any Tegra based device,
and only on those.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] FPC Android crashes in Tegra CPUs

2014-12-20 Thread Florian Klämpfl
Am 20.12.2014 um 15:45 schrieb Sergio Flores:
 I've recently discovered that some fpc math functions crash on Tegra CPUs 
 (ARM7/Android), even when
 called with valid arguments.
 
 Anyone has a clue what could cause this or possible workarounds?
 
 Eg: Calling lnxp1(x) with x1 results in a SIGILL crash.

Can you provide a stack trace?

 
 I did my own naive implementation of this function in pure pascal without 
 calling any FPC math
 function, and it fixed the problem.
 However currently I found another crash in the same hardware that points to 
 fpc_ln_real function,
 and don't really want to reimplement lots of math functions.
 Probably any function related to logaritms suffers from this,.
 
 Notes - I'm compiling with FPC 2.7.1 (from trunk, but not most recent, I 
 probably compiled it 2 or 3
 months ago). 

First trying with current trunk would be helpful.

 Optimizations are off, due to them being currently broken in ARM7.
 

Why?

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel