1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Other
Rafael Espindola 644c5436f5 Fix crash when multiple raw_fd_ostreams to stdout are created.
If raw_fd_ostream is constructed with the path of "-", it claims
ownership of the stdout file descriptor. This means that it closes
stdout when it is destroyed. If there are multiple users of
raw_fd_ostream wrapped around stdout, then a crash can occur because
of operations on a closed stream.

An example of this would be running something like "clang -S -o - -MD
-MF - test.cpp". Alternatively, using outs() (which creates a local
version of raw_fd_stream to stdout) anywhere combined with such a
stream usage would cause the crash.

The fix duplicates the stdout file descriptor when used within
raw_fd_ostream, so that only that particular descriptor is closed when
the stream is destroyed.

Patch by James Henderson!

llvm-svn: 297624
2017-03-13 14:45:06 +00:00
..
Inputs Teach lit to expand glob expressions. 2017-03-03 18:55:24 +00:00
X86
2002-01-31-CallGraph.ll
2002-02-24-InlineBrokePHINodes.ll
2002-03-11-ConstPropCrash.ll
2003-02-19-LoopInfoNestingBug.ll
2004-08-16-PackedConstantInlineStore.ll
2004-08-16-PackedGlobalConstant.ll
2004-08-16-PackedSelect.ll
2004-08-16-PackedSimple.ll
2004-08-20-PackedControlFlow.ll
2006-02-05-PassManager.ll
2007-04-24-eliminate-mostly-empty-blocks.ll
2007-06-05-PassID.ll
2007-06-28-PassManager.ll
2007-09-10-PassManager.ll
2008-02-14-PassManager.ll
2008-06-04-FieldSizeInPacked.ll
2008-10-06-RemoveDeadPass.ll
2008-10-15-MissingSpace.ll
2009-03-31-CallGraph.ll
2009-06-05-no-implicit-float.ll
2009-09-14-function-elements.ll
2010-05-06-Printer.ll
attribute-comment.ll
bcanalyzer-block-info.txt
can-execute.txt
cgscc-devirt-iteration.ll [PM] Add devirtualization-based iteration utility into the new PM's 2017-02-12 05:38:04 +00:00
cgscc-iterate-function-mutation.ll
cgscc-observe-devirt.ll [PM] Introduce a devirtualization iteration layer for the new PM. 2016-12-28 11:07:33 +00:00
cleanup-lcssa.ll
close-stderr.ll
constant-fold-gep-address-spaces.ll
constant-fold-gep.ll opt: Rename -default-data-layout flag to -data-layout and make it always override the layout. 2017-02-17 17:36:52 +00:00
debugcounter-newgvn.ll NewGVN: Add debug counter for value numbering 2017-03-01 19:59:26 +00:00
debugcounter-predicateinfo.ll NewGVN: Add debug counter for value numbering 2017-03-01 19:59:26 +00:00
extract-alias.ll
extract-linkonce.ll
extract-weak-odr.ll
extract.ll
FileCheck-space.txt
invalid-commandline-option.ll
lint.ll
lit-globbing.ll Teach lit to expand glob expressions. 2017-03-03 18:55:24 +00:00
lit-quoting.txt
lit-unicode.txt
llvm-nm-without-aliases.ll
loop-pass-ordering.ll [PM] Rewrite the loop pass manager to use a worklist and augmented run 2017-01-11 06:23:21 +00:00
loop-pm-invalidation.ll [PM] Relax the patterns used in the new test I added because some 2017-02-10 08:48:50 +00:00
new-pass-manager.ll [PM] Fix a bug in the new loop PM when handling functions with no loops. 2017-02-10 08:26:58 +00:00
new-pm-defaults.ll [PM/Inliner] Make the new PM's inliner process call edges across an 2017-03-09 11:35:40 +00:00
new-pm-lto-defaults.ll [PM/Inliner] Make the new PM's inliner process call edges across an 2017-03-09 11:35:40 +00:00
opt-bisect-helper.py
opt-bisect-legacy-pass-manager.ll
opt-override-mcpu-mattr.ll
opt-twice.ll
optimization-remarks-inline.ll
optimization-remarks-invalidation.ll Correct a typo, s/hosting/hoisting/ 2017-02-14 16:41:10 +00:00
optimization-remarks-lazy-bfi.ll Move test of lazy BFI with ORE to a generic directory 2017-01-13 00:16:23 +00:00
optimize-options.ll
pass-pipeline-parsing.ll [PM] Rewrite the loop pass manager to use a worklist and augmented run 2017-01-11 06:23:21 +00:00
pass-pipelines.ll
pipefail.txt
ResponseFile.ll
spir_cc.ll
statistic.ll
umask.ll
writing-to-stdout.ll Fix crash when multiple raw_fd_ostreams to stdout are created. 2017-03-13 14:45:06 +00:00