<div dir="ltr">For Zig we use LLD as a library. So for us it would be better to avoid global state such as SIGBUS (or any other signal handlers), instead returning an error from the link function when linking fails. If lld can encapsulate this signal handling and prevent the application using lld from getting the signal directly, instead carefully handling the signal in LLD itself and translating it into a proper error code or message, this would be reasonable.<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 23, 2017 at 6:21 PM, Rui Ueyama via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If your system does not support fallocate(2), we use ftruncate(2) to create an output file. fallocate(2) succeeds even if your disk have less space than the requested size, because it creates a sparse file. If you mmap such sparse file, you'll receive a SIGBUS when the disk actually becomes full.<div><br></div><div>So, lld can die suddenly with SIGBUS when your disk becomes full, and currently we are not doing anything about it. It's sometimes hard to notice that that was caused by the lack of disk space.</div><div><br></div><div>I wonder if we should print out a hint (e.g. "Bus error -- disk full?") when we receive a SIGBUS. Any opinions?</div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>