diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-09 05:51:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-09 05:51:34 +0000 |
commit | c9049a9ea8993e64b58c206fed6609a1415519f2 (patch) | |
tree | 50d6b1ae5ab073afdba47ab43e753f578dc02554 | |
parent | f4afdfc501b7185d24a0ef184fe3d0c0bbe22e0c (diff) | |
download | llvm-c9049a9ea8993e64b58c206fed6609a1415519f2.tar.gz llvm-c9049a9ea8993e64b58c206fed6609a1415519f2.tar.bz2 llvm-c9049a9ea8993e64b58c206fed6609a1415519f2.tar.xz |
fix a potentially serious bug in AliasSet::removeCallSite
where we shrunk the list without updating the end iterator.
By inspection, from PR9639.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129190 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.rules | 22 | ||||
-rw-r--r-- | include/llvm/Analysis/AliasSetTracker.h | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/Makefile.rules b/Makefile.rules index 5fc77a5e51..7ffb7bf433 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -376,7 +376,7 @@ ifeq ($(HOST_OS),MingW) endif endif -CXX.Flags += -Woverloaded-virtual +CXX.Flags += -Woverloaded-virtual -Wuninitialized-experimental CPP.BaseFlags += $(CPP.Defines) AR.Flags := cru @@ -1528,31 +1528,31 @@ BC_DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.bc.d.tmp" "$(ObjDir)/$*.bc.d"; $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) # Provide alternate rule sets if dependencies are disabled @@ -1580,23 +1580,23 @@ $(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" - $(BCCompile.CXX) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" - $(BCCompile.CXX) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" - $(BCCompile.CXX) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" - $(BCCompile.C) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.C) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" - $(BCCompile.C) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.C) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) endif diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index e844d10dda..4efa3963b6 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -259,6 +259,7 @@ private: if (CallSites[i] == CS.getInstruction()) { CallSites[i] = CallSites.back(); CallSites.pop_back(); + --i; --e; // Revisit the moved entry. } } void setVolatile() { Volatile = true; } |