[PATCH] D51836: [bugpoint] Fix TempFile scoping bug

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 8 23:36:44 PDT 2018


Meinersbur added a comment.

Sorry, this does not fix bug http://llvm.org/PR38390 for me. I still get:

  $ bugpoint polly-timeout-grtestutils.ll -verify -opt-command=C:\Users\meinersbur\build\llvm\release\bin\opt.exe
  Read input file      : 'polly-timeout-grtestutils.ll'
  *** All input ok
  Running selected passes on program to test for crash: C:\Users\meinersbur\build\llvm\release\bin\opt.exe: bugpoint-input-18caf6b.bc: error: Could not open input file: permission denied
  Exited with error code '1'
  
  *** Debugging optimizer crash!
  Checking to see if these passes crash: -verify: C:\Users\meinersbur\build\llvm\release\bin\opt.exe: bugpoint-input-75e7dbd.bc: error: Could not open input file: permission denied
  Exited with error code '1'
  
  *** Found crashing pass: -verify
  Emitted bitcode to 'bugpoint-passes.bc'
  
  *** You can reproduce the problem with: opt bugpoint-passes.bc -verify
  Checking for crash with changing conditionals to always jump to true: call1.i.noexc call1.i.noexc.split invoke.cont invoke.cont6 for.cond lpad lpad1 invoke.cont10 invoke.cont17 call.i.i.noexc... <33 total>: C:\Users\meinersbur\build\llvm\release\bin\opt.exe: bugpoint-input-6f44ec7.bc: error: Could not open input file: permission denied
  verify failed!

compared to when using r334629 (74928bc090c2626a3d4c3749a0d025922a25b13b), the commit before ("LTO: Keep file handles open for memory mapped files")

  $ bugpoint polly-timeout-grtestutils.ll -verify -opt-command=C:\Users\meinersbur\build\llvm\release\bin\opt.exe
  Read input file      : 'polly-timeout-grtestutils.ll'
  *** All input ok
  Running selected passes on program to test for crash: Success!
  Initializing execution environment: Found lli: C:\Users\meinersbur\build\llvm\release\bin\lli.exe
  Sorry, I can't automatically select a safe interpreter!
  
  Exiting.

However, the early discard seems an obvious error. Do you happen to have a test case that shows that the code is used at all?



================
Comment at: tools/bugpoint/ExecutionDriver.cpp:320
-    }
-  }
-
----------------
Is the error you suspect that `~DiscardTemp` of `Discard` is called here, before any work is done?

For http://llvm.org/PR38390, the file accessed is called `bugpoint-input-b43aded.bc` (`BugDriver::runPasses` creates file name with this pattern). The file deleted here would be called `bugpoint-test-program-....bc`.


Repository:
  rL LLVM

https://reviews.llvm.org/D51836





More information about the llvm-commits mailing list