Go to file
Yichao Yu 221dae31a5 Clear LastMappingSymbols and LastEMS(Info) when resetting the ARM(AArch64)ELFStreamer
Summary:
This causes a segfault on ARM when (I think) the pass manager is used multiple times.

Reset set the (last) current section to NULL without saving the corresponding LastEMSInfo back into the map. The next use of the streamer then save the LastEMSInfo for the NULL section leaving the LastEMSInfo mapping for the last current section (the one that was there before the reset) NULL which cause the LastEMSInfo to be set to NULL when the section is being used again.

The reuse of the section (pointer) might mean that the map was holding dangling pointers previously which is why I went for clearing the map and resetting the info, making it as similar to the state right after the constructor run as possible. The AArch64 one doesn't have segfault (since LastEMS isn't a pointer) but it seems to have the same issue.

The segfault is likely caused by https://reviews.llvm.org/D30724 which turns LastEMSInfo into a pointer. As mentioned above, it seems that the actual issue was older though.

No test is included since the test is believed to be too complicated for such an obvious fix and not worth doing.

Reviewers: llvm-commits, shankare, t.p.northover, peter.smith, rengolin

Reviewed By: rengolin

Subscribers: mgorny, aemerson, rengolin, javed.absar, kristof.beyls

Differential Revision: https://reviews.llvm.org/D38588

llvm-svn: 316679
2017-10-26 17:36:43 +00:00
clang Move MS inline asm parser methods out of line to reduce indentation, NFC 2017-10-26 17:07:48 +00:00
clang-tools-extra [clangd] Report an error on findDefinitions/signatureHelp on an unopened file instead of crashing. 2017-10-26 12:28:13 +00:00
compiler-rt [sanitizer] Fix internal symbolized build on Debian 9 2017-10-26 06:08:01 +00:00
debuginfo-tests Revert r313600 due to bot failures on Green Dragon. 2017-09-19 14:51:37 +00:00
libclc math: Implement native_log10 2017-10-25 16:49:22 +00:00
libcxx Mark string_view's constructor from (ptr,len) as noexcept (an extension). Update the tests to check this (and other noexcept bits 2017-10-24 16:30:06 +00:00
libcxxabi Fix ASAN build with older compiler-rt versions. 2017-09-14 22:37:34 +00:00
libunwind [libunwind] Always use unwind tables in tests 2017-10-26 12:02:03 +00:00
lld [ELF] - Dedupliсate FDEs when sections are ICFed. 2017-10-26 09:13:19 +00:00
lldb Allow SysV-i386 ABI on everything other than Apple targets 2017-10-26 17:04:20 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm Clear LastMappingSymbols and LastEMS(Info) when resetting the ARM(AArch64)ELFStreamer 2017-10-26 17:36:43 +00:00
openmp Fix fatal error message displaying 2017-10-25 22:05:02 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [Simplify] Mark (and sweep) based on latest access relation. 2017-10-26 12:34:36 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.