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

[metacling] Prevent nullptr access if compiler instance was not created #16928

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Contributor

This Pull request:

Changes or fixes:

exit with error1 code instead of crashing

Fixes https://its.cern.ch/jira/browse/ROOT-10239

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

Copy link

github-actions bot commented Nov 13, 2024

Test Results

    18 files      18 suites   4d 0h 5m 9s ⏱️
 2 678 tests  2 677 ✅ 0 💤 1 ❌
46 342 runs  46 337 ✅ 4 💤 1 ❌

For more details on these failures, see this check.

Results for commit 5772649.

♻️ This comment has been updated with latest results.

@dpiparo dpiparo self-assigned this Nov 14, 2024
@dpiparo
Copy link
Member

dpiparo commented Nov 14, 2024

this is good improvement: thanks! I was wondering whether exiting is the best course of actions or if an exception or a clear error message could be of help. Now that the location in the code has been identified, I can also re-open a PR including the commit included in this one and enhance the visibility of the problem for the user (which is a simple thing to do, at this point...)

@ferdymercury
Copy link
Contributor Author

ferdymercury commented Nov 14, 2024

I tried first throwing a runtime_exception, but the problem is that this class has an exception handler which auto-dumps a full stack trace onto stdout, which is exactly what we didn't want :S So exit(1) seemed cleaner since the error message was already printed before. A middle ground would be to add another "cout" before the exit(1);

@dpiparo
Copy link
Member

dpiparo commented Nov 15, 2024

Ah, I see. Thanks. Can we maybe go for a last "cerr" before the exit? Then for me the PR is ready to merge for me.

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.

2 participants