Yuanfang Chen 647c3f4e47 [Support] make report_fatal_error abort instead of exit
Summary:
This patch could be treated as a rebase of D33960. It also fixes PR35547.
A fix for `llvm/test/Other/close-stderr.ll` is proposed in D68164. Seems
the consensus is that the test is passing by chance and I'm not
sure how important it is for us. So it is removed like in D33960 for now.
The rest of the test fixes are just adding `--crash` flag to `not` tool.

** The reason it fixes PR35547 is

`exit` does cleanup including calling class destructor whereas `abort`
does not do any cleanup. In multithreading environment such as ThinLTO or JIT,
threads may share states which mostly are ManagedStatic<>. If faulting thread
tearing down a class when another thread is using it, there are chances of
memory corruption. This is bad 1. It will stop error reporting like pretty
stack printer; 2. The memory corruption is distracting and nondeterministic in
terms of error message, and corruption type (depending one the timing, it
could be double free, heap free after use, etc.).

Reviewers: rnk, chandlerc, zturner, sepavloff, MaskRay, espindola

Reviewed By: rnk, MaskRay

Subscribers: wuzish, jholewinski, qcolombet, dschuff, jyknight, emaste, sdardis, nemanjai, jvesely, nhaehnle, sbc100, arichardson, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, lenary, s.egerton, pzheng, cfe-commits, MaskRay, filcab, davide, MatzeB, mehdi_amini, hiraditya, steven_wu, dexonsmith, rupprecht, seiya, llvm-commits

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D67847
2020-01-15 17:05:13 -08:00
..
2019-07-11 21:19:33 +00:00
2019-06-20 15:08:34 +00:00
2019-06-20 15:08:34 +00:00
2019-05-08 22:09:57 +00:00
2019-06-20 15:08:34 +00:00
2019-03-29 17:35:56 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2019-05-13 19:30:06 +00:00
2019-06-14 00:33:31 +00:00
2019-09-25 18:50:34 +00:00
2019-03-19 15:50:24 +00:00
2019-10-07 10:57:41 +00:00
2018-04-30 19:08:16 +00:00
2020-01-06 17:21:51 -05:00
2019-07-01 17:17:45 +00:00
2019-03-21 12:01:21 +00:00
2019-07-09 18:10:06 +00:00
2019-06-20 16:29:40 +00:00
2019-07-08 19:03:38 +00:00
2019-03-12 21:02:54 +00:00
2019-03-12 21:02:54 +00:00
2017-08-07 18:30:35 +00:00
2019-07-11 21:19:33 +00:00
2019-07-08 19:03:38 +00:00
2019-03-21 12:01:21 +00:00
2019-07-11 21:19:33 +00:00
2019-03-19 15:50:24 +00:00
2019-04-26 16:37:51 +00:00
2019-03-19 15:50:24 +00:00
2020-01-09 15:56:36 -08:00
2019-07-15 17:50:31 +00:00
2019-06-20 15:08:34 +00:00
2019-05-08 22:09:57 +00:00
2019-05-03 15:37:07 +00:00
2018-06-27 15:33:33 +00:00
2019-07-24 19:40:13 +00:00
2019-07-27 14:32:23 +00:00
2018-06-27 15:33:33 +00:00
2017-08-07 18:30:35 +00:00
2020-01-09 15:56:36 -08:00
2017-08-07 18:30:35 +00:00
2020-01-09 15:56:36 -08:00
2019-06-20 15:08:34 +00:00
2020-01-09 15:56:36 -08:00
2019-06-20 15:08:34 +00:00
2020-01-09 15:56:36 -08:00
2019-05-03 15:37:07 +00:00
2017-08-07 18:30:35 +00:00
2020-01-09 15:56:36 -08:00
2019-03-21 12:01:21 +00:00
2020-01-12 22:44:51 -05:00
2019-06-20 15:08:34 +00:00
2020-01-09 15:56:36 -08:00

+==============================================================================+
| How to organize the lit tests                                                |
+==============================================================================+

- If you write a test for matching a single DAG opcode or intrinsic, it should
  go in a file called {opcode_name,intrinsic_name}.ll (e.g. fadd.ll)

- If you write a test that matches several DAG opcodes and checks for a single
  ISA instruction, then that test should go in a file called {ISA_name}.ll (e.g.
  bfi_int.ll

- For all other tests, use your best judgement for organizing tests and naming
  the files.

+==============================================================================+
| Naming conventions                                                           |
+==============================================================================+

- Use dash '-' and not underscore '_' to separate words in file names, unless
  the file is named after a DAG opcode or ISA instruction that has an
  underscore '_' in its name.