[Openmp-commits] [PATCH] D51623: [libomptarget] PR38704: Fix erase of ShadowPtrMap
Sergey Dmitriev via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Sep 4 10:17:50 PDT 2018
sdmitriev added a comment.
Not related to this patch, but I think there is one more potentially incorrect use of containers in RTLsTy::RegisterLib(). This function may increase size of the global vector Devices when it initializes a new RTL that has not been yet used (see rtl.cpp line 219). This may result in memory reallocation and thus all pointers to the Devices elements that are stored in RTLs (see rtl.cpp line 228) would become invalid. I am not sure if these pointers are really used by RTLs now, but if yes, than it is a problem. RTLsTy::RegisterLib may be called more than once and each call may potentially initialize new RTLs.
More information about the Openmp-commits