]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] Fix uninitialised read in gomp_map_vars_internal
authorJulian Brown <julian@codesourcery.com>
Mon, 16 Sep 2019 20:02:31 +0000 (13:02 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:25 +0000 (12:51 +0100)
libgomp/
* target.c (gomp_map_vars_internal): Remove read of uninitialised
data.

(cherry picked from openacc-gcc-9-branch commit
dce6d63aa6d598939b36ac968aa9aa48eaf5f3a2)

libgomp/ChangeLog.omp
libgomp/target.c

index 1a624af1ff989e5b6ac4a2be47d26d698c7b3a7e..41e05e9c61b26d4d9387408f52d3e3d6e1543367 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-17  Julian Brown  <julian@codesourcery.com>
+
+       * target.c (gomp_map_vars_internal): Remove read of uninitialised
+       data.
+
 2019-09-17  Julian Brown  <julian@codesourcery.com>
 
        * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run
index 5f7f946e2ba7c3add57cfb344ec7714740f2b495..0656df1961304e86a32b8220fc420bf7e96b9f29 100644 (file)
@@ -1556,8 +1556,7 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep,
                                      kind & typemask, cbufp);
            else
              {
-               if (k->virtual_refcount == VREFCOUNT_LINK_KEY)
-                 k->u.link_key = NULL;
+               k->u.link_key = NULL;
                if (n && n->refcount == REFCOUNT_LINK)
                  {
                    /* Replace target address of the pointer with target address