<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 1, 2019, at 2:23 PM, Akira Hatanaka via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">On Tue, Jul 30, 2019 at 7:53 AM Brian Gesiak <<a href="mailto:modocache@gmail.com" class="">modocache@gmail.com</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Thank you for the link and the suggestion to try master! I did so and<br class="">discovered that it reproduces on master for me as well. The repro<br class="">script I used (unchanged from before) and the output can be found<br class="">here:<span class="Apple-converted-space"> </span><a href="https://gist.github.com/modocache/d9700166067f4a155820bc57d9bee1f3" rel="noreferrer" target="_blank" class="">https://gist.github.com/modocache/d9700166067f4a155820bc57d9bee1f3</a><br class=""><br class="">(Note that the output looks nearly identical, but it's using clang-10<br class="">from the master branch of llvm-project.)<br class=""><br class="">I wonder why the buildbots would begin passing again, whereas locally<br class="">the issue reproduces... very strange. Looking at the CMake invocation<br class="">in the build logs that Akira linked to, I can see that<br class="">'-DLLVM_ENABLE_MODULES=On' is being used. Could it be one of the other<br class="">options is masking the error I'm seeing on master?<br class=""><br class=""></blockquote><div class=""><br class=""></div><div class="">Sorry, I didn't notice that someone had disabled modules by passing '-DLLVM_ENABLE_MODULES=Off' to cmake. I think that's why we haven't seen the failure since July 19th.</div><div class=""> </div><div class=""><a href="http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4172/consoleText" class="">http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4172/consoleText</a><br class=""></div></div></div></div></div></div></blockquote><div><br class=""></div><div>Oh, that's unfortunate. As another data point, the LLDB jobs build llvm+clang+lldb with modules enabled and seem to be doing fine at the moment:</div><div><br class=""></div><div><a href="http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/32443/consoleFull" class="">http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/32443/consoleFull</a></div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">- Brian Gesiak<br class=""><br class="">On Mon, Jul 29, 2019 at 1:51 PM Akira Hatanaka <<a href="mailto:ahatanak@gmail.com" target="_blank" class="">ahatanak@gmail.com</a>> wrote:<br class="">><br class="">> This is probably the same failure we've been seeing here:<br class="">><br class="">><span class="Apple-converted-space"> </span><a href="http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4124/console" rel="noreferrer" target="_blank" class="">http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4124/console</a><br class="">><br class="">> But it looks like the bot has turned green since July 19th, so I'm wondering whether you are still seeing the same failure if you use trunk?<br class="">><br class="">> If I remember correctly, there was a MemberExpr node in the AST that was referencing the anonymous union in class Expected, but the parent class (class Expected) didn't contain the AST node for the anonymous union.<br class="">><br class="">> On Mon, Jul 29, 2019 at 6:41 AM Brian Gesiak via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">>><br class="">>> I ran into an LLVM/Clang crash when attempting to do the following:<br class="">>><br class="">>> 1. Build Clang from the release/9.x branch source.<br class="">>> 2. Use the Clang from (1) to build clangd on the release/9.x branch,<br class="">>> with LLVM_ENABLE_MODULES=On.<br class="">>><br class="">>> I wrote a script to reproduce the crash:<br class="">>><span class="Apple-converted-space"> </span><a href="https://gist.github.com/modocache/ac366ca9673b93bb21e75d3e72162608" rel="noreferrer" target="_blank" class="">https://gist.github.com/modocache/ac366ca9673b93bb21e75d3e72162608</a><br class="">>><br class="">>> At the above URL, you'll find a script `repro.sh` that reproduces the<br class="">>> crash, and a file `out.txt` that contains the build output and the<br class="">>> stack trace.<br class="">>><br class="">>> I used the script to bisect, and bisect determined the first "bad" commit was:<br class="">>><span class="Apple-converted-space"> </span><a href="https://github.com/llvm/llvm-project/commit/baae41ff76f662987f31447686ba819dcd748b3f" rel="noreferrer" target="_blank" class="">https://github.com/llvm/llvm-project/commit/baae41ff76f662987f31447686ba819dcd748b3f</a><br class="">>><br class="">>> The stack trace appears to crash when generating code for an<br class="">>> `llvm::Expected` declaration, and the commit above seems to add a few<br class="">>> of them, so that seems suspicious. The stack trace is in the GitHub<br class="">>> gist URL above, but I'll also paste the relevant portion here:<br class="">>><br class="">>> ```<br class="">>> Stack dump:<br class="">>> 0. Program arguments: ...<br class="">>> 1. <eof> parser at end of file<br class="">>> 2. Per-file LLVM IR generation<br class="">>> 3. /home/modocache/Source/llvm/git/dev/llvm-project/llvm/include/llvm/Support/Error.h:625:17:<br class="">>> Generating code for declaration<br class="">>> 'llvm::Expected<std::__cxx11::basic_string<char> >::getStorage'<br class="">>> /home/modocache/Source/llvm/git/dev/build-s1/bin/clang-9(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2a)[0x557bc131549a]<br class="">>> /home/modocache/Source/llvm/git/dev/build-s1/bin/clang-9(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x557bc13131b4]<br class="">>> /home/modocache/Source/llvm/git/dev/build-s1/bin/clang-9(+0x1649335)[0x557bc1313335]<br class="">>> /lib/x86_64-linux-gnu/libpthread.so.0(+0x13f40)[0x7f3bc780af40]<br class="">>> /home/modocache/Source/llvm/git/dev/build-s1/bin/clang-9(_ZN5clang7CodeGen15CodeGenFunction18EmitLValueForFieldENS0_6LValueEPKNS_9FieldDeclE+0x8ad)[0x557bc1749abd]<br class="">>> ```<br class="">>><br class="">>> I have an immediate workaround -- I can turn off LLVM_ENABLE_MODULES,<br class="">>> and the crash goes away. However, I think it might be worth looking<br class="">>> into the commit above and determining why it crashes when using<br class="">>> `-fmodules`. At first glance, I don't see the problem, but I've cc'ed<br class="">>> the author, in case they might know more.<br class="">>><br class="">>> Does anyone have any ideas on how to fix the underlying crash?<br class="">>><br class="">>> - Brian Gesiak<br class="">>> _______________________________________________<br class="">>> LLVM Developers mailing list<br class="">>><span class="Apple-converted-space"> </span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">>><span class="Apple-converted-space"> </span><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class=""></blockquote></div></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">LLVM Developers mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a></span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></span></div></blockquote></div><br class=""></body></html>