Re: "Bad or missing .orc_unwind table. Disabling unwinder." Clang 19 problem? 6.12.8 problem?

From: Nathan Chancellor
Date: Tue Jan 14 2025 - 12:18:57 EST


On Tue, Jan 14, 2025 at 10:59:44AM +0100, Klaus Kusche wrote:
> On 14/01/2025 10:51, Nathan Chancellor wrote:
> >> Nathan, I think this is a Clang 19 issue, where one of the jump table
> >> entries is pointing past the end of the function. When we saw this in
> >> the past I think it was due to some leftover optimization, where the
> >> jump table entry ended up unused so it was harmless. Are you aware of
> >> any recent bugs in that area?
> >
> > I am not aware of any recent bugs there but if you or Klaus have a
> > configuration file that triggers this, I would be happy to bisect LLVM
> > to see what change introduced it to give us a better understanding of
> > what is happening here.
>
> Kernel .config files are attached to both
>
> https://bugzilla.kernel.org/show_bug.cgi?id=219685
>
> https://bugzilla.kernel.org/show_bug.cgi?id=219686

Thanks a lot, I missed that since I do not interact with Bugzilla much.

I bisected this change in behavior to LLVM commit 64ed699b3d81 ("Reland
"[SimplifyCFG] When only one case value is missing, replace default with
that case (#76669)"") [1]. I can see how that would cause this issue but
I am not sure how it is specifically interacting with this particular
kernel code. I am going to try and tease out a reproducer for this and
report it upstream but it would still probably be good to consider if
objtool could handle this, especially in the face of the upcoming
--Werror.

[1]: https://github.com/llvm/llvm-project/commit/64ed699b3d811407e5a9f1111f63e11dc7f7dd80

Cheers,
Nathan