From ripley at stats.ox.ac.uk  Wed Oct 14 10:10:43 2015
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 14 Oct 2015 09:10:43 +0100
Subject: [Rd] gcc ubsan alignement test --minimal gcc version?
In-Reply-To: <561D0B22.7060208@gmail.com>
References: <CAMNYAqWCK3Hc+h+jV2PK_CGeP-o+cMhue6FU9H36onze-u9rDg@mail.gmail.com>
	<561BF4F3.2030200@gmail.com> <561CA6B2.4080000@gmail.com>
	<561D0B22.7060208@gmail.com>
Message-ID: <561E0E03.6050706@stats.ox.ac.uk>

On 13/10/2015 14:46, kaveh wrote:
>    Dear All,
>
>    I'm trying to implement the section of the manual pertaining to the
> gcc-ubsan test
>    carried by CRAN on my local computer (ubuntu 14.04):
>
>    http://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-UBSAN/README.txt
>
>    I was wondering whether someone could tell what the minimal version
>     of the gcc tool chain needed to run the gcc-ASAN and gcc-UBSAN
> alignment
>    tests on ones local computer is. CRAN seems to use gcc 5.2.0 to do
> these tests,
>     but the current version of gcc shipped with ubuntu is 4.9.2 (to be
> updated to
>     5.1.0 with the 15.10 release latter this month).
>
>   I hope this is the correct list to post this.

The correct thing to do is to read the manual (either the R manual or 
your gcc manual).  The R manual says

'AddressSanitizer (?ASan?) is a tool with similar aims to the memory 
checker in valgrind. It is available with suitable builds of gcc 4.8.0 
or clang 3.1 and later on common Linux and OS X platforms.'

'?UBSanitizer? is a tool for C/C++ source code selected by 
-fsanitize=undefined in suitable builds of clang, and GCC as from 4.9.0.'

Note that including these capabilities and their runtimes is optional at 
least for clang (until recently Apple omitted them), so you need to 
check your own system's documentation.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK



[Rd] gcc ubsan alignement test --minimal gcc version?
Prof Brian Ripley