================
@@ -746,27 +746,18 @@ Status Scalar::SetValueFromData(const DataExtractor &data,
bool Scalar::SignExtend(uint32_t sign_bit_pos) {
const uint32_t max_bit_pos = GetByteSize() * 8;
- if (sign_bit_pos < max_bit_pos) {
- switch (m_type) {
- case Scalar::e_void:
- case Scalar::e_float:
- return false;
+ assert(sign_bit_pos <= max_bit_pos);
----------------
bulbazord wrote:
I'm a little unsure about this assert. Are there any ways we can get to this
assertion through user input?
The situation I would like to avoid is somebody typing something into LLDB or
loading some invalid DWARF that causes this assertion to trigger. Certainly we
would like to know about ways this invariant can be broken, but developers
trying to debug generally do not appreciate it when their debug session dies
for a reason they do not understand or do not control.
cc @JDevlieghere I remember you had some guidance around this involving
`lldbassert`?
https://github.com/llvm/llvm-project/pull/95678
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits