diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-01-30 15:35:09 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-01-30 15:40:58 -0800 |
commit | 58c4fa2c538a73527aeeb4c7535016d9b9a1df18 (patch) | |
tree | e9644b0481e19cc9e23ca7e2630d1c4b700a4adf /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 6a4acb9d809aaadb9304a7a2f3382d958a6c2adf (diff) | |
download | llvm-58c4fa2c538a73527aeeb4c7535016d9b9a1df18.zip llvm-58c4fa2c538a73527aeeb4c7535016d9b9a1df18.tar.gz llvm-58c4fa2c538a73527aeeb4c7535016d9b9a1df18.tar.bz2 |
[lldb/Reproducers] Use LLDB_RECORD_DUMMY for GetStopDescription
GetStopDescription writes to a const char* with a given length. However,
the reproducer instrumentation serialized the char pointer and length
separately.
To serialize the string, we naively look for the first null byte to
determine its length. This can lead to the method overwriting the input
buffer when the assumed string length is smaller than the actual number
of bytes written by GetStopDescription.
The real solution is to have a custom serializer that takes both
arguments into account. However, given that these are output parameters,
they don't affect replay. If the string is passed as input later, it's
is recorded as such. Therefore I've replaced the instrumentation macro
with LLDB_RECORD_DUMMY which skips the serialization.
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions