summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/crash-report.c
Commit message (Collapse)AuthorAgeFilesLines
* [Clang][Driver] After default -fintegrated-cc1, make ↵Alexandre Ganea2020-02-121-0/+8
| | | | | | | | | | | | | llvm::report_fatal_error() generate preprocessed source + reproducer.sh again. Added a test for #pragma clang __debug llvm_fatal_error to test for the original issue. Added llvm::sys::Process::Exit() and replaced ::exit() in places where it was appropriate. This new function would call the current CrashRecoveryContext if one is running on the same thread; or call ::exit() otherwise. Fixes PR44705. Differential Revision: https://reviews.llvm.org/D73742 (cherry picked from commit faace365088a2a3a4cb1050a9facfc34a7a56577)
* Re-land "[Clang][Driver] Remove -M group options ..." and "[Clang] Avoid ↵Alexandre Ganea2020-02-101-5/+20
| | | | | | | | | | | crashing when generating crash diagnostics when '#pragma clang __debug ..." This re-lands commits f41ec709d9d388dc43469e6ac7f51b6313f7e4af (https://reviews.llvm.org/D74076) and commit 5fedc2b410853a6aef05e8edf19ebfc4e071e28f (https://reviews.llvm.org/D74070) The previous build break was caused by '#pragma clang __debug llvm_unreachable' used in a non-assert build. Move it to a separate test in crash-report-with-asserts.c. (cherry picked from commit 75f09b54429bee17a96e2ba7a2ac0f0a8a7f7e74)
* Re-apply r334418 "Enable crash recovery tests on Windows, globs work in the ↵Hans Wennborg2018-06-121-5/+2
| | | | | | | | | | | | | | | | lit internal shell now" Plus change run lines from not env FOO=bar %clang to env FOO=bar not %clang To not confuse the internal shell. llvm-svn: 334494
* Revert r334418 "Enable crash recovery tests on Windows, globs work in the ↵Hans Wennborg2018-06-121-0/+3
| | | | | | | | | | lit internal shell now" The tests fail on Windows bots, and for me locally. > Enable crash recovery tests on Windows, globs work in the lit internal shell now llvm-svn: 334493
* Enable crash recovery tests on Windows, globs work in the lit internal shell nowReid Kleckner2018-06-111-3/+0
| | | | llvm-svn: 334418
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-111-2/+1
| | | | llvm-svn: 320398
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Note: this is a recommit after a test failure took down the original (r318669) Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 320391
* Revert r318669/318694Erich Keane2017-11-201-2/+1
| | | | | | Broke some libclang tests, so reverting for now. llvm-svn: 318698
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-11-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 318669
* Driver: Strip -header-include-file and -diagnostic-log-file from crash repro ↵Justin Bogner2015-08-051-2/+6
| | | | | | | | | scripts These two arguments tend to refer to a local path that won't exist when we try to reproduce a bug. Strip them. llvm-svn: 244179
* Revert three tests enabled on r243236, they fail on clang-x86-win2008-selfhost.Yaron Keren2015-07-261-0/+3
| | | | llvm-svn: 243237
* Enable passing clang tests on Windows/MSYS.Yaron Keren2015-07-261-3/+0
| | | | llvm-svn: 243236
* Driver: Determine file names for crash reports more reliablyJustin Bogner2015-07-171-0/+1
| | | | | | | | Guessing which file name to replace based on the -main-file-name argument to -cc1 is flawed. Instead, keep track of which arguments are inputs to each command. llvm-svn: 242504
* Driver: Include the driver arguments in crash reportsJustin Bogner2015-07-091-1/+5
| | | | | | | Similarly to r231989, the driver arguments can be quite helpful in diagnosing a crash. llvm-svn: 241786
* Driver: Print the clang version and original command in crash scriptsJustin Bogner2015-03-121-1/+3
| | | | | | | | | | When a crash report script doesn't work for a reproduction on your machine for one reason or another, it can be really tricky to figure out why not. The compiler version that crashed and the original command line before stripping flags are very helpful when this comes up. llvm-svn: 231989
* Driver: Quote the command in crash reproduction scripts.Justin Bogner2014-10-211-15/+15
| | | | | | | | This fixes crash report generation when filenames have spaces. It also removes an awkward workaround that quoted *some* arguments when generating crash reports. llvm-svn: 220307
* Driver: Tighten up crash report testsJustin Bogner2014-10-211-6/+2
| | | | | | These tests were a little bit too flexible in terms of filenames. llvm-svn: 220265
* Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵Alp Toker2014-07-161-3/+0
| | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159
* clang/test/Driver/crash-report.c: This requires rewriter for ↵NAKAMURA Takumi2014-07-161-0/+3
| | | | | | -frewrite-includes. [PR20321] llvm-svn: 213150
* Driver: Fix a misleading comment and test for what it actually didJustin Bogner2014-06-261-0/+1
| | | | llvm-svn: 211806
* Driver: Restore proper naming of crashdump filesJustin Bogner2014-06-241-3/+3
| | | | | | Based on a review of r211411 by Jordan Rose. llvm-svn: 211572
* Driver: In crashdumps with -fmodule, dump the module dependenciesJustin Bogner2014-06-201-2/+0
| | | | llvm-svn: 211421
* Driver: Record that we're in crashdump and push flags to ConstructJobJustin Bogner2014-06-201-3/+3
| | | | | | | | | | | It's more flexible and arguably better layering to set flags to modify compiling for diagnostics in the CC1 job themselves, rather than tweaking the driver flags and letting them propagate. There is one visible change this causes: crash report files will now get preprocessed names (.i and friends). llvm-svn: 211411
* When Driver::generateCompilationDiagnostics is filtering the list ofPaul Robinson2014-04-281-1/+1
| | | | | | | inputs to the preprocessor, check for invalid types first because not all linker inputs have an option value to retrieve. llvm-svn: 207454
* Driver: Skip the -fmodules-cache-path argument in driver crash diagsJustin Bogner2014-04-221-0/+2
| | | | | | | The modules cache path shouldn't be included in crash reports, as it's a system (or run) specific directory. llvm-svn: 206922
* Use -Xclang to pass -internal-isystem and -internal-externc-isystem to -cc1.Rafael Espindola2013-09-251-1/+2
| | | | | | They are cc1 options only, so the driver was ignoring them. llvm-svn: 191379
* Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.Hans Wennborg2013-09-121-0/+1
| | | | | | | | | | | | | | | | | This moves the code to Job.cpp, which seems like a more natural fit, and replaces the "is this a JobList? is this a Command?" logic with a virtual function call. It also removes the code duplication between PrintJob and PrintDiagnosticJob and simplifies the code a little. There's no functionality change here, except that the Executable is now always printed within quotes, whereas it would previously not be quoted in crash reports, which I think was a bug. Differential Revision: http://llvm-reviews.chandlerc.com/D1653 llvm-svn: 190620
* Fixing commit r187768: Moved diagnosis of forward declarations of variable ↵Larisse Voufo2013-08-061-0/+3
| | | | | | templates from Parser to Sema. llvm-svn: 187770
* Moved diagnosis of forward declarations of variable templates from Parser to ↵Larisse Voufo2013-08-061-3/+0
| | | | | | Sema. llvm-svn: 187768
* clang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. ↵NAKAMURA Takumi2013-08-061-0/+3
| | | | | | | | Investigating. I met a message, "fatal error: file 'nul' modified since it was first processed". llvm-svn: 187767
* Require a shell for this test.Rafael Espindola2013-07-041-0/+3
| | | | | | | Some versions of python will expand the glob used in the test, others wont, causing the test to fail when run with LIT_USE_INTERNAL_SHELL=1. llvm-svn: 185653
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-041-2/+2
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* Produce an actual error before attempting to attach notes to it when bailing outRichard Smith2012-12-251-0/+2
| | | | | | due to FORCE_CLANG_DIAGNOSTICS_CRASH=1. Also add a test for that env var. llvm-svn: 171074
* [driver] Completely rework how superfluous options are stripped out of the crashChad Rosier2012-10-311-1/+2
| | | | | | | | | | | | diagnostics script. This addresses the FIXME pertaining to quoted arguments. We also delineate between those flags that have an argument (e.g., -D macro, -MF file) and those that do not (e.g., -M, -MM, -MG). Finally, we add the -dwarf-debug-flags to the list of flags to be removed. rdar://12329974 llvm-svn: 167152
* [driver crash diagnostics] Strip -internal-isystem and ↵Chad Rosier2012-07-251-0/+3
| | | | | | | | -internal-externc-isystem. rdar://11949066 llvm-svn: 160752
* [driver crash diagnostics] Strip -idirafter, -iprefix, -iwithprefix,Chad Rosier2012-07-251-1/+8
| | | | | | | -iwithprefixbefore, and -isystem options, per Matt's suggestion. rdar://11949066 llvm-svn: 160750
* [driver crash diagnostics] A few enhancements:Chad Rosier2012-07-251-2/+6
| | | | | | | | | -Strip -iquote and -M options. -Quote -D options to avoid problems with command line macros that include parens. rdar://11949066 llvm-svn: 160743
* test/Driver/crash-report.c: Remove "REQUIRES: shell". env(1) can be used ↵NAKAMURA Takumi2012-07-171-2/+1
| | | | | | also with gnuwin32. llvm-svn: 160362
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-1/+1
| | | | | | | | | | | - lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
* test/Driver/crash-report.c: Small tweaks. 1) Use %t instead %T for TMP. 2) ↵NAKAMURA Takumi2012-07-171-4/+5
| | | | | | Set all of $TMPDIR, $TEMP and $TMP, or a certain host might set $TEMP. llvm-svn: 160342
* test/Driver/crash-report.c: don't fail if there are no files left behind by ↵Richard Smith2012-07-021-1/+1
| | | | | | a previous run of this test! llvm-svn: 159615
* Improve crash reporting test coverage.David Blaikie2012-07-021-2/+8
| | | | | | | | | | This adds validation that the * repro source is only rewrite-includes processed, not fully preprocessed. * repro script contains macro definitions (-DFOO=BAR). Based on suggestions/help by Matt Beaumont-Gay. llvm-svn: 159605
* test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. ↵NAKAMURA Takumi2012-06-301-0/+1
| | | | | | Investigating. llvm-svn: 159476
* Unbreak the test from r159469.David Blaikie2012-06-291-1/+1
| | | | llvm-svn: 159474
* Use -frewrite-includes for crash reports.David Blaikie2012-06-291-0/+6
In future changes we should: * use __builtin_trap rather than derefing 'random' volatile pointers. * avoid dumping temporary files into /tmp when running tests, instead preferring a location that is properly cleaned up by lit. Review by Chandler Carruth. llvm-svn: 159469
OpenPOWER on IntegriCloud