[Lldb-commits] [lldb] r221805 - Avoid crash in InitializeNonZerothFrame if no module found

Jason Molenda jason at molenda.com
Wed Nov 12 11:24:01 PST 2014


Thanks Ed.  I originally wrote it with a null check but I thought I could only get here with a valid symbol context so I'd get a module for this lookup and I removed the check.  Sometimes I code a little too defensively and it can become too verbose. :/

J

> On Nov 12, 2014, at 10:56 AM, Ed Maste <emaste at freebsd.org> wrote:
> 
> Hi Jason,
> 
> On 12 November 2014 13:49, Ed Maste <emaste at freebsd.org> wrote:
>> URL: http://llvm.org/viewvc/llvm-project?rev=221805&view=rev
>> ...
>> -        if (temporary_module_sp->ResolveSymbolContextForAddress (temporary_pc, resolve_scope, m_sym_ctx) & resolve_scope)
>> +        if (temporary_module_sp &&
>> +            temporary_module_sp->ResolveSymbolContextForAddress (temporary_pc, resolve_scope, m_sym_ctx) & resolve_scope)
> 
> I'm not sure if it's expected that temporary_module_sp could be null,
> so perhaps further changes are needed. But at least it makes sense to
> continue on with m_sym_ctx_valid = false rather than crashing.
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits





More information about the lldb-commits mailing list