Yes, it was revealed by the tests in ubsan testbot. Best regards, Alexey Bataev
> 8 июня 2020 г., в 21:10, David Blaikie <dblai...@gmail.com> написал(а): > > Is this covered by existing tests? > >> On Thu, Jun 4, 2020 at 2:52 PM Alexey Bataev via cfe-commits >> <cfe-commits@lists.llvm.org> wrote: >> >> >> Author: Alexey Bataev >> Date: 2020-06-04T17:52:06-04:00 >> New Revision: 4e3d4622b1e7bd419815510e5f7cd0f96595b2a3 >> >> URL: >> https://github.com/llvm/llvm-project/commit/4e3d4622b1e7bd419815510e5f7cd0f96595b2a3 >> DIFF: >> https://github.com/llvm/llvm-project/commit/4e3d4622b1e7bd419815510e5f7cd0f96595b2a3.diff >> >> LOG: Fix undefined behaviour when trying to deref nullptr. >> >> Added: >> >> >> Modified: >> clang/lib/CodeGen/CodeGenFunction.h >> >> Removed: >> >> >> >> ################################################################################ >> diff --git a/clang/lib/CodeGen/CodeGenFunction.h >> b/clang/lib/CodeGen/CodeGenFunction.h >> index 2b0ebad3088e..cfd9950066bb 100644 >> --- a/clang/lib/CodeGen/CodeGenFunction.h >> +++ b/clang/lib/CodeGen/CodeGenFunction.h >> @@ -684,18 +684,18 @@ class CodeGenFunction : public CodeGenTypeCache { >> /// Manages parent directive for scan directives. >> class ParentLoopDirectiveForScanRegion { >> CodeGenFunction &CGF; >> - const OMPExecutableDirective &ParentLoopDirectiveForScan; >> + const OMPExecutableDirective *ParentLoopDirectiveForScan; >> >> public: >> ParentLoopDirectiveForScanRegion( >> CodeGenFunction &CGF, >> const OMPExecutableDirective &ParentLoopDirectiveForScan) >> : CGF(CGF), >> - ParentLoopDirectiveForScan(*CGF.OMPParentLoopDirectiveForScan) { >> + ParentLoopDirectiveForScan(CGF.OMPParentLoopDirectiveForScan) { >> CGF.OMPParentLoopDirectiveForScan = &ParentLoopDirectiveForScan; >> } >> ~ParentLoopDirectiveForScanRegion() { >> - CGF.OMPParentLoopDirectiveForScan = &ParentLoopDirectiveForScan; >> + CGF.OMPParentLoopDirectiveForScan = ParentLoopDirectiveForScan; >> } >> }; >> >> >> >> >> _______________________________________________ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits