Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ExceptionDemo] Correct and update example ExceptionDemo #69485

Merged
merged 7 commits into from
May 15, 2024

Conversation

epitavy
Copy link
Contributor

@epitavy epitavy commented Oct 18, 2023

The ExceptionDemo example was no longer compiling (since llvm 14 at least). The PR makes the example work with the current API and also transition from MCJIT to ORC.
Fixes #63702

@epitavy epitavy changed the title [ExceptionDemo] Correct and update example ExceptionDemo (#63702) [ExceptionDemo] Correct and update example ExceptionDemo Oct 18, 2023
@github-actions
Copy link

github-actions bot commented Oct 18, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

@joker-eph
Copy link
Collaborator

This is switching to OrcJit, so maybe @lhames can help review this example?

Also seems like no bot is building with LLVM_ENABLE_EH and the examples enabled?

@epitavy
Copy link
Contributor Author

epitavy commented Nov 6, 2023

ping

Copy link
Contributor

@lhames lhames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed on top-of-tree: LLJIT now reflects process symbols by default.

@lhames
Copy link
Contributor

lhames commented Nov 6, 2023

Otherwise LGTM.

@epitavy
Copy link
Contributor Author

epitavy commented Nov 13, 2023

That true, I just removed the corresponding code

Copy link
Contributor

@lhames lhames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @epitavy!

@epitavy
Copy link
Contributor Author

epitavy commented Nov 14, 2023

Thanks @lhames .
I am not sure of the next steps. I rebased this branch onto main but I don't have the commit permission

@epitavy
Copy link
Contributor Author

epitavy commented Nov 21, 2023

Ping @lhames

@kmistryic
Copy link

@epitavy , can you rebase and follow guideline here https://llvm.org/docs/GitHub.html

@epitavy
Copy link
Contributor Author

epitavy commented Mar 19, 2024

@kmistryic The rebase is done, I messed up a little bit with the commit history, but it should be clean. Can you land the changes ? I don't have commit permission to do it

@kamleshbhalui
Copy link
Contributor

@epitavy , Have you tested locally with below command?
cmake ../llvm -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_EXAMPLES=ON

@kamleshbhalui
Copy link
Contributor

I just tried It still failing but different error now.

@epitavy
Copy link
Contributor Author

epitavy commented Mar 27, 2024

Right, I missed an error because I didn't build with debug enabled, so assertions were removed. It's fixed now.

@epitavy
Copy link
Contributor Author

epitavy commented Apr 9, 2024

ping @kamleshbhalui

@epitavy
Copy link
Contributor Author

epitavy commented Apr 24, 2024

@lhames

@kamleshbhalui kamleshbhalui merged commit 2ece5cc into llvm:main May 15, 2024
3 checks passed
@lhames
Copy link
Contributor

lhames commented May 15, 2024

@epitavy Sorry I didn't get to this earlier -- I've been busy with a relocation. @kamleshbhalui -- thanks very much for landing!

@kamleshbhalui
Copy link
Contributor

@epitavy Please have a look at it again

@epitavy
Copy link
Contributor Author

epitavy commented May 15, 2024

It is still not building correctly ?

@epitavy epitavy restored the update-exception-demo branch May 15, 2024 13:01
@kamleshbhalui
Copy link
Contributor

Correct, test by executing the ExceptionDemo once build succeed.

@epitavy
Copy link
Contributor Author

epitavy commented May 15, 2024

It works as expected for me, except that some values are wrong.

Gen: About to throw exception type <2> in throwFunct.
Gen: Exception type <96> received (stack unwound)  in innerCatchFunct.
                    ^^^^

96 should be 2, but the bug was already here, and I don't know how to fix that

@kamleshbhalui
Copy link
Contributor

I have reverted for now, and reopened the issue.

@epitavy
Copy link
Contributor Author

epitavy commented May 15, 2024

You expect someone to fix the bug on this pull request ? I am not sure about the process to follow

@epitavy
Copy link
Contributor Author

epitavy commented May 15, 2024

I think I fixed the bug, where should I push the patch ?

@kamleshbhalui
Copy link
Contributor

kamleshbhalui commented May 17, 2024

Can you share entire execution log of ExceptionDemo here?

@kamleshbhalui
Copy link
Contributor

kamleshbhalui commented May 17, 2024

I think you have to create new PR with all the change, you can mention this PR there.

@epitavy
Copy link
Contributor Author

epitavy commented May 17, 2024

Can you share entire execution log of ExceptionDemo here?

I share the log on the new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LLVM Build fails if exception enabled
5 participants