This is an archive of the discontinued LLVM Phabricator instance.

[clang-repl] XFAIL riscv targets in simple-exception test case
ClosedPublic

Authored by asb on Jan 10 2023, 5:57 AM.

Details

Summary

I'm not familiar with this infrastructure so haven't dug into why it's failing, but it is failing for me on RISC-V. As Arm targets are also XFAILed it doesn't seem like an unreasonable "fix" to XFAIL for RISC-V too - but if it looks like an easy fix might be possible from someone who's been working in the area, I'd obviously welcome that as an alternative!

For reference, the output of this test is currently:

clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> Running f()
terminate called after throwing an instance of 'char const*'
Aborted (core dumped)

Diff Detail

Event Timeline

asb created this revision.Jan 10 2023, 5:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2023, 5:57 AM
asb requested review of this revision.Jan 10 2023, 5:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2023, 5:57 AM
sunho added a comment.EditedJan 13 2023, 10:03 PM

Do you have an exception support in your libstdc++ and it's dynamically linked? I believe if clang-repl was able to execute the program, it must have successfully linked to cxxthrow symbols and so exception handling works correctly.

Maybe @Hahnfeld knows something as he added riscv support to clang-repl recently.

Hahnfeld accepted this revision.Jan 14 2023, 1:35 AM

Yes, this is correct: The JITLink backend for RISC-V doesn't (yet) register the eh frames into libunwind, so throwing and catching exceptions through JITted code doesn't work (yet). I know in principle how to make this happen and it's on my list, but I couldn't give it priority before a talk on Thursday. Sorry for not realizing we have a test for this in clang-repl - does this mean we have bots running this natively on RISC-V?

This revision is now accepted and ready to land.Jan 14 2023, 1:35 AM
asb added a comment.Jan 17 2023, 5:30 AM

Yes, this is correct: The JITLink backend for RISC-V doesn't (yet) register the eh frames into libunwind, so throwing and catching exceptions through JITted code doesn't work (yet). I know in principle how to make this happen and it's on my list, but I couldn't give it priority before a talk on Thursday. Sorry for not realizing we have a test for this in clang-repl - does this mean we have bots running this natively on RISC-V?

Not yet, but hopefully soon.