<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Dylan,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Kev</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 3, 2016, at 6:48 PM, Dylan McKay <<a href="mailto:dylanmckay34@gmail.com" class="">dylanmckay34@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important" class="">r276686 introduced a regression into the object archive writer.</p><p style="margin:0px 0px 1.2em!important" class=""><a href="http://276686/" class="">r276686</a> on Phabricator</p><p style="margin:0px 0px 1.2em!important" class="">It causes the constructor <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" class="">Archive::Child(Parent, Data, StartOfFile)</code> to segfault if it is given a parent equalling NULL.</p><p style="margin:0px 0px 1.2em!important" class="">LLVM does this in a few places. The most prominent example is the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" class="">Archive::child_iterator</code> default constructor. This will never execute without causing a segfault.</p><p style="margin:0px 0px 1.2em!important" class="">I’m in the process of updating Rust to LLVM 4.0. We are currently using <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" class="">Archive::child_iterator</code>, and it causes us to segfault when writing object files.</p>
<div title="MDH:cjI3NjY4NiBpbnRyb2R1Y2VkIGEgcmVncmVzc2lvbiBpbnRvIHRoZSBvYmplY3QgYXJjaGl2ZSB3
cml0ZXIuPGRpdj48YnI+PC9kaXY+PGRpdj5bcjI3NjY4Nl0oMjc2Njg2KSZuYnNwO29uIFBoYWJy
aWNhdG9yPGJyPjxkaXY+PGJyPjwvZGl2PjxkaXY+SXQgY2F1c2VzIHRoZSBjb25zdHJ1Y3RvciBg
QXJjaGl2ZTo6Q2hpbGQoUGFyZW50LCBEYXRhLCBTdGFydE9mRmlsZSlgIHRvIHNlZ2ZhdWx0IGlm
IGl0IGlzIGdpdmVuIGEgcGFyZW50IGVxdWFsbGluZyBOVUxMLjwvZGl2PjxkaXY+PGJyPjwvZGl2
PjxkaXY+TExWTSBkb2VzIHRoaXMgaW4gYSBmZXcgcGxhY2VzLiBUaGUgbW9zdCBwcm9taW5lbnQg
ZXhhbXBsZSBpcyB0aGUgYEFyY2hpdmU6OmNoaWxkX2l0ZXJhdG9yYCBkZWZhdWx0IGNvbnN0cnVj
dG9yLiBUaGlzIHdpbGwgbmV2ZXIgZXhlY3V0ZSB3aXRob3V0IGNhdXNpbmcgYSBzZWdmYXVsdC48
L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2PjxkaXY+SSdtIGluIHRoZSBwcm9jZXNzIG9mIHVwZGF0
aW5nIFJ1c3QgdG8gTExWTSA0LjAuIFdlIGFyZSBjdXJyZW50bHkgdXNpbmcgYEFyY2hpdmU6OmNo
aWxkX2l0ZXJhdG9yYCwgYW5kIGl0IGNhdXNlcyB1cyB0byBzZWdmYXVsdCB3aGVuIHdyaXRpbmcg
b2JqZWN0IGZpbGVzLjwvZGl2PjxkaXY+PGJyPjwvZGl2PjwvZGl2PjwvZGl2Pg==" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0" class="">​</div></div></div>
</div></blockquote></div><br class=""></div></body></html>