Bug 1723245 Comment 15 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Information dump/current status:

**Is this a linker issue?**

As noted in [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1723245#c2), one theory is that we were incorrectly using `ld` (`ld.bfd`) instead of LLVM's `lld`.
However, looking into [the referenced docs](https://clang.llvm.org/docs/AddressSanitizer.html) again, I'm realizing that it's saying that we need to let `clang` manage the linking, rather than us doing the linking ourselves.
Indeed, `clang` is managing the linking when it fails - this is clear, because underneath the link errors, clang says that it was calling the linker: `clang-12: error: linker command failed ...`.

**What is the cause of this issue?**

I'm not sure yet - one theory is that this is a Clang bug that's related to [instantiating templates in header files](https://bugzilla.mozilla.org/show_bug.cgi?id=1723245#c8) and address sanitization.
Additional work is needed to narrow down the cause, though - probably whittling down the build into a minimal reproduce, which is a non-trivial amount of work.

**Can the issue be reproduced in a local dev environment?**

Yes, see [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1723245#c13)

**Next steps**

Since this is work-aroundable at the moment, I'm leaning towards deferring this - perhaps it'll be noticed and resolved upstream.
Unless someone knows a clear cause/reason behind this failure, debugging it will take me multiple days, which I'm not sure is worth it just yet.
I'll re-title this bug to better capture its current state and send it to the backlog.

If we do encounter this issue again, at least we have some useful information logged in this ticket which can help in the future.
Thanks for your help digging into this Steve :)
Information dump/current status:

**Is this a linker issue?**

As noted in [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1723245#c2), one theory is that we were incorrectly using `ld` (`ld.bfd`) instead of LLVM's `lld`.
However, looking into [the referenced docs](https://clang.llvm.org/docs/AddressSanitizer.html) again, I'm realizing that it's saying that we need to let `clang` manage the linking, rather than us doing the linking ourselves.
Indeed, `clang` is managing the linking when it fails - this is clear, because underneath the link errors, clang says that it was calling the linker: `clang-12: error: linker command failed ...`.

**What is the cause of this issue?**

I'm not sure yet - one theory is that this is a Clang bug that's related to [instantiating templates in header files](https://bugzilla.mozilla.org/show_bug.cgi?id=1723245#c8) and address sanitization.
Additional work is needed to narrow down the cause, though - probably whittling down the build into a minimal reproduce, which is a non-trivial amount of work.

**Can the issue be reproduced in a local dev environment?**

Yes, see [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1723245#c13)

**Next steps**

Since this is work-aroundable at the moment, I'm leaning towards deferring this - perhaps it'll be encountered and resolved upstream.
Unless someone knows a clear cause/reason behind this failure, debugging it will take me multiple days, which I'm not sure is worth it just yet.
I'll re-title this bug to better capture its current state and send it to the backlog.

If we do encounter this issue again, at least we have some useful information logged in this ticket which can help in the future.
Thanks for your help digging into this Steve :)

Back to Bug 1723245 Comment 15