Re: Porting libsanitizer to aarch64

2013-05-23 Thread Richard Henderson
On 05/23/2013 09:43 AM, Richard Earnshaw wrote: > So you're saying the documentation is wrong, or at the very least > misleading... What about dealing with address validation for soft accesses? > Surely we get better code if the SFP ~= HFP since we end up with fewer cases > where we fall back to

Re: Porting libsanitizer to aarch64

2013-05-23 Thread Richard Henderson
On 05/23/2013 09:28 AM, Richard Earnshaw wrote: > Doing that would add significantly to the cost of setting up the frame. It shouldn't... > > FRAME_GROWS_DOWNWARD > Define this macro to nonzero value if the addresses of local variable slots > are > at negative offsets from the frame pointer. Y

Re: Porting libsanitizer to aarch64

2013-05-23 Thread Richard Earnshaw
On 23/05/13 17:36, Jakub Jelinek wrote: On Thu, May 23, 2013 at 05:28:29PM +0100, Richard Earnshaw wrote: FWIW, I would actually recommend against conditionalizing FRAME_GROWS_DOWNWARD for a new port. Just make it _always_ grow down and save yourself the additional code bloat in the backend.

Re: Porting libsanitizer to aarch64

2013-05-23 Thread Jakub Jelinek
On Thu, May 23, 2013 at 05:28:29PM +0100, Richard Earnshaw wrote: > >FWIW, I would actually recommend against conditionalizing > >FRAME_GROWS_DOWNWARD > >for a new port. Just make it _always_ grow down and save yourself the > >additional code bloat in the backend. > > Doing that would add signif

Re: Porting libsanitizer to aarch64

2013-05-23 Thread Richard Earnshaw
On 22/05/13 21:19, Richard Henderson wrote: On 05/22/2013 12:43 AM, Jakub Jelinek wrote: Changing frame grows upward into frame grows downward shouldn't be that hard, see e.g. rs6000 port, where #define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0 || flag_asan != 0) and grep the port where it u

Re: Porting libsanitizer to aarch64

2013-05-22 Thread Richard Henderson
On 05/22/2013 12:43 AM, Jakub Jelinek wrote: > Changing frame grows upward into frame grows downward shouldn't be that > hard, see e.g. rs6000 port, where > #define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0 || flag_asan != 0) > and grep the port where it uses FRAME_GROWS_DOWNWARD. > Basically y

Re: Porting libsanitizer to aarch64

2013-05-22 Thread Jakub Jelinek
On Wed, May 22, 2013 at 11:25:18AM +0400, Konstantin Serebryany wrote: > > > Then arises a runtime problem: aarch64's frame grows upward which is > > > not supported: how long would it take to develop this support if at > > > all possible? > > > > Better do what all other targets that want to suppo

Re: Porting libsanitizer to aarch64

2013-05-22 Thread Konstantin Serebryany
[resending in plain text mode; arghh] On Wed, May 22, 2013 at 11:25 AM, Konstantin Serebryany wrote: > Hi Christophe, > > We would love to see the aarch64-specific changes in upstream repo > (see https://code.google.com/p/address-sanitizer/wiki/HowToBuild). > Once the changes are in the upstream

Re: Porting libsanitizer to aarch64

2013-05-21 Thread Jakub Jelinek
On Tue, May 21, 2013 at 05:35:45PM +0200, Christophe Lyon wrote: > I have been looking at enabling libsanitizer for aarch64 GCC compilers. > > To make the build succeed, I had to modify libsanitizer code: > - some syscalls are not available on aarch64 (libsanitizer uses some > legacy ones such as

Porting libsanitizer to aarch64

2013-05-21 Thread Christophe Lyon
Hi, I have been looking at enabling libsanitizer for aarch64 GCC compilers. To make the build succeed, I had to modify libsanitizer code: - some syscalls are not available on aarch64 (libsanitizer uses some legacy ones such as open, readlink, stat, ...) - unwinding code needs to be added. What's