https://github.com/steakhal commented:

> > I think this would still trip on the same memory issue. The problem to me 
> > is that we read uninitialized memory. So even if you limit the bounds of 
> > the result of the read of such uninitialized memory, it would only mask and 
> > limit the effect of such read. Have you tried running the failing case via 
> > valgrind? That's usually great for catching uninitialized reads. msan is 
> > also great, but that needs an instrumented standard library which may be 
> > tough to set up.
> 
> I don't think so. I have an asan build locally and it worked.
> 
> The methods `getParent()` and `getIndexInBlock()` in CFGElementRef does not 
> access memory, since they only return the value from the ref. The actual 
> dereference happens in `->` operator, which is gated after the newly added 
> `if` condition.

My understanding is that asan will not check if a memory is initialized or not. 
It checks if the access is valid - but since you guard the access we would 
brush this under the carpet now.

https://github.com/llvm/llvm-project/pull/139980
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to