<div dir="ltr"><div dir="ltr">On Sun, Jun 7, 2020 at 6:19 PM Chris Lattner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">+Saleem as one of the people who know a lot about Windows.<br>
<br>
I don’t have any technical insight on this, but if we can, it would be great to drop this.<br>
<br>
-Chris<br>
<br>
> On Jun 7, 2020, at 12:44 AM, Michael Kruse via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> <br>
> We still have the program called "KillTheDoctor" [1] in our source<br>
> tree. Its original intention was to stop requiring user interaction<br>
> for crashing regression tests under Windows (infamous Dr. Watson,<br>
> nowadays "[program] has stopped working" [2]), I don't think it is<br>
> useful anymore. It's also a very hacky approach, as admitted in the<br>
> source comment itself ("I hate Windows.")<br>
> <br>
> I don't think it was the right approach in the first place. Today,<br>
> LLVM tools disable error reporting themselves [3,4].<br>
> SEM_NOGPFAULTERRORBOX [5] can be passed when launching arbitrary<br>
> programs with error reporting disabled.<br>
> <br>
> The only reference to it in the current source tree is compiler-rt [6]<br>
> and explicitly mentions it should be integrated with "not --crash".<br>
> However, it apparently already handles this case [7] and is already<br>
> used outside of compiler-rt, eg. [8]. Removing the special case for<br>
> Windows in [6] still passes the tests on my Windows machine (at least<br>
> check-asan and check-builtins).<br>
> <br>
> Therefore, I propose to remove KillTheDoctor.<br></blockquote><div><br></div><div>At this point, the expected environment is pretty much Windows 10. That is plenty new enough to support the use of `SetThreadErrorMode`. I don't see a strong reason to use the DebugAPI to trace the process when we can ensure that we set the error mode properly in `LLVMInitializeCore`. This seems pretty reasonable to me. I think that conferring with Ried and Nico is a good idea to ensure that the chrome team doesn't have any issues with this.</div><div><br></div><div>+1 from me.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> Michael<br>
> <br>
> [1] <a href="https://github.com/llvm/llvm-project/tree/master/llvm/utils/KillTheDoctor" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/tree/master/llvm/utils/KillTheDoctor</a><br>
> [2] <a href="https://www.ecosia.org/images?q=%22has+stopped+working%22" rel="noreferrer" target="_blank">https://www.ecosia.org/images?q=%22has+stopped+working%22</a><br>
> [3] <a href="https://github.com/llvm/llvm-project/blob/master/llvm/lib/Support/Windows/Signals.inc#L484" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/llvm/lib/Support/Windows/Signals.inc#L484</a><br>
> [4] <a href="https://github.com/llvm/llvm-project/blob/master/llvm/utils/unittest/UnitTestMain/TestMain.cpp#L38" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/llvm/utils/unittest/UnitTestMain/TestMain.cpp#L38</a><br>
> [5] <a href="https://devblogs.microsoft.com/oldnewthing/20160204-00/?p=92972" rel="noreferrer" target="_blank">https://devblogs.microsoft.com/oldnewthing/20160204-00/?p=92972</a><br>
> [6] <a href="https://github.com/llvm/llvm-project/blob/master/compiler-rt/test/lit.common.cfg.py#L219" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/compiler-rt/test/lit.common.cfg.py#L219</a><br>
> [7] <a href="https://github.com/llvm/llvm-project/blob/master/llvm/utils/not/not.cpp#L48" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/llvm/utils/not/not.cpp#L48</a><br>
> [8] <a href="https://github.com/llvm/llvm-project/blob/master/clang/test/Frontend/remove-file-on-signal.c#L2" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/master/clang/test/Frontend/remove-file-on-signal.c#L2</a><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div></div>