mstorsjo added a comment.

I'm also running into issues due to this commit. Unfortunately, the issues 
don't seem to be entirely deterministic. They can be reproduced with 
https://martin.st/temp/python-preproc.c:

  $ clang -target i686-w64-mingw32 -c -g -O3 python-preproc.c
  Assertion failed: (!(Elmt.getFragmentOrDefault() == 
Next.getFragmentOrDefault())), function operator(), file 
AssignmentTrackingAnalysis.cpp, line 2020.

I'm seeing this on macOS with LLVM built with Xcode's clang. On Linux, built 
with either GCC or Clang, I don't run into this issue.

When running the seemingly working compiler build on Linux in valgrind, I'm 
hitting use of uninitialized data:

  ==3054473== Conditional jump or move depends on uninitialised value(s)
  ==3054473==    at 0x4900F0A: 
llvm::ConstantExpr::getGetElementPtr(llvm::Type*, llvm::Constant*, 
llvm::ArrayRef<llvm::Value*>, bool, std::optional<unsigned int>, llvm::Type*) 
(in /home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)
  ==3054473==    by 0x48C865F: foldGEPOfGEP(llvm::GEPOperator*, llvm::Type*, 
bool, llvm::ArrayRef<llvm::Value*>) (in 
/home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)
  ==3054473==    by 0x48D1285: llvm::ConstantFoldGetElementPtr(llvm::Type*, 
llvm::Constant*, bool, std::optional<unsigned int>, 
llvm::ArrayRef<llvm::Value*>) (in 
/home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)
  ==3054473==    by 0x4900CEF: 
llvm::ConstantExpr::getGetElementPtr(llvm::Type*, llvm::Constant*, 
llvm::ArrayRef<llvm::Value*>, bool, std::optional<unsigned int>, llvm::Type*) 
(in /home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)
  ==3054473==    by 0x4025C21: simplifyGEPInst(llvm::Type*, llvm::Value*, 
llvm::ArrayRef<llvm::Value*>, bool, llvm::SimplifyQuery const&, unsigned int) 
[clone .constprop.0] (in 
/home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)
  ==3054473==    by 0x4036E5F: 
simplifyInstructionWithOperands(llvm::Instruction*, 
llvm::ArrayRef<llvm::Value*>, llvm::SimplifyQuery const&, unsigned int) [clone 
.constprop.0] (in /home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)
  ==3054473==    by 0x4037423: llvm::simplifyInstruction(llvm::Instruction*, 
llvm::SimplifyQuery const&) (in 
/home/martin/code/llvm-project-bisect/llvm/build/bin/clang-17)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146987/new/

https://reviews.llvm.org/D146987

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to