llvm-project/lldb/unittests
Jason Molenda f62080451c The x86 instruction unwinder can be asked to disassemble non-instruction
blocks of memory, and if the final bytes of that block look like a long
x86 instruction, it can cause the llvm disassembler to read past the end
of the buffer.  Use the maximum allowed instruction length that we pass
to the llvm disassembler as a way to limit this to the size of the buffer.

An example of how to trigger this is when lldb does a function call, it
puts a breakpoint on the beginning of main() and uses that as the return
address from the function call.  When we stop at that location, lldb may
try to find the first frame up the stack.  Because this is on the first
instruction of a function, it will get the word-size value at the stack
pointer and assume that this was the caller's pc value.  But this is random
stack memory and could point to anything - an object in memory, something
in the data section, whatever.  And if we have a symbol for that thing,
we'll try to disassemble it.

This was leading to infrequent crashes in customer scenarios; figured out
what was happening with address sanitizer.

<rdar://problem/30463256> 

llvm-svn: 307454
2017-07-08 00:12:15 +00:00
..
Breakpoint Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Core Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Editline Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Expression Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Host Add pretty-printer for wait(2) statuses and modernize the code handling them 2017-06-19 12:47:50 +00:00
Interpreter [unittests] Add a helper function for getting an input file 2017-06-29 13:02:11 +00:00
Language Add more tests for ExtractContextAndIdentifier 2017-04-06 23:12:43 +00:00
ObjectFile [unittests] Add a helper function for getting an input file 2017-06-29 13:02:11 +00:00
Platform [CMake] Update unit tests with accurate dependencies 2017-02-01 22:17:00 +00:00
Process Fix some warnings in ProcessorTraceTest.cpp 2017-07-04 12:29:30 +00:00
ScriptInterpreter Added new API to SBStructuredData class 2017-05-29 08:25:46 +00:00
Signals Make LLDB skip server-client roundtrip for signals that don't require any actions 2017-03-07 21:34:40 +00:00
Symbol [unittests] Add a helper function for getting an input file 2017-06-29 13:02:11 +00:00
SymbolFile Fix a cmake typo to unbreak windows unit tests 2017-06-30 07:54:35 +00:00
Target [unittests] Add a helper function for getting an input file 2017-06-29 13:02:11 +00:00
UnwindAssembly The x86 instruction unwinder can be asked to disassemble non-instruction 2017-07-08 00:12:15 +00:00
Utility Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
debugserver Rename Error -> Status. 2017-05-12 04:51:55 +00:00
tools Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
CMakeLists.txt New framework for lldb client-server communication tests. 2017-06-06 13:40:18 +00:00
gtest_common.h [Windows] Remove the #include <eh.h> hack. 2017-03-03 20:21:59 +00:00