[patch, fortran, testsuite] Subdirectory for -fsanitize=address tests

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch, fortran, testsuite] Subdirectory for -fsanitize=address tests

gcc - fortran mailing list
Hello world,

because the test case for PR 94788 requires -fsanitize=address to expose
the double free, I have created a subdirectory under gfortran.dg
where such test cases can go.

I have tested this with

make check-fortran RUNTESTFLAGS="asan.exp=*"

and it works; with a compiler that introduces the double free bug
into the test case, the result is as expected:

FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0
execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O1
execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O2
execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions  execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3 -g
execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -Os
execution test

So, any comments regarding style, functionality etc?  If not, I plan
on committing this to trunk within the next couple of days.

Regards

        Thomas

asan.diff.txt (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[PATCH] gfortran: Get asan library from TEST_ALWAYS_FLAGS

gcc - fortran mailing list
On Fri, May 1, 2020 at 6:04 AM Thomas Koenig via Gcc-patches
<[hidden email]> wrote:

>
> Hello world,
>
> because the test case for PR 94788 requires -fsanitize=address to expose
> the double free, I have created a subdirectory under gfortran.dg
> where such test cases can go.
>
> I have tested this with
>
> make check-fortran RUNTESTFLAGS="asan.exp=*"
>
> and it works; with a compiler that introduces the double free bug
> into the test case, the result is as expected:
>
> FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0
> execution test
> FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O1
> execution test
> FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O2
> execution test
> FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
> -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
> -finline-functions  execution test
> FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3 -g
> execution test
> FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -Os
> execution test
>
> So, any comments regarding style, functionality etc?  If not, I plan
> on committing this to trunk within the next couple of days.
>
I checked in this patch to fix:

https://gcc.gnu.org/pipermail/gcc-regression/2020-May/072549.html

FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O1
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O1
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O1
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O2
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O2
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O2
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions  (test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions  (test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions  (test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-g  (test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-g  (test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3
-g  (test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -Os
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -Os
(test for excess errors)
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -Os
(test for excess errors)

--
H.J.

0001-gfortran-Get-asan-library-from-TEST_ALWAYS_FLAGS.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] gfortran: Get asan library from TEST_ALWAYS_FLAGS

gcc - fortran mailing list
Hi H.J.,

> I checked in this patch to fix:
>
> https://gcc.gnu.org/pipermail/gcc-regression/2020-May/072549.html

Thanks for the fix!