Regression in object archive writer

Kevin Enderby via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 11:01:27 PDT 2016


Hi Dylan,

I worked with Lang Hames on this back in July when this change was made.  I don’t recall the exact details off the top of my head, but one key points of the thinking was you could not use this without handling the Error.  I’ll seem to recall the only case one of the default constructors was allowed was for a sentinel value.

I’ll try to grab Lang today and try to look at this and get back to you.  Sorry the details are not fresh on my mind as we did make these changes over 2 months ago.

Kev

> On Oct 3, 2016, at 6:48 PM, Dylan McKay <dylanmckay34 at gmail.com> wrote:
> 
> r276686 introduced a regression into the object archive writer.
> 
> r276686 <http://276686/> on Phabricator
> 
> It causes the constructor Archive::Child(Parent, Data, StartOfFile) to segfault if it is given a parent equalling NULL.
> 
> LLVM does this in a few places. The most prominent example is the Archive::child_iterator default constructor. This will never execute without causing a segfault.
> 
> I’m in the process of updating Rust to LLVM 4.0. We are currently using Archive::child_iterator, and it causes us to segfault when writing object files.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161004/1ba8d032/attachment.html>


More information about the llvm-commits mailing list