Skip to content

Conversation

@ferdymercury
Copy link
Collaborator

This Pull request:

Changes or fixes:

even if it becomes negative due to the overflow.

Fixes #17697

Tested that the Python reproducer in #17697 no longer crashes

code = """
struct Foo
{
  enum E {
    BIG = ((unsigned long long)1)<<63
  };
};
"""

import ROOT
ROOT.gInterpreter.Declare (code)

f = ROOT.Foo()
f.BIG
(Foo::E::Foo::E::BIG) : (internal_enum_type_t) -9223372036854775808

Checklist:

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

Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

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

I suppose this is an okay solution. It would be even better if we could return the correct value (would likely require more significant changes)

@dpiparo
Copy link
Member

dpiparo commented Jan 16, 2026

Do we maybe need a unit test for this?

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 12h 4m 54s ⏱️
 3 811 tests  3 811 ✅ 0 💤 0 ❌
76 733 runs  76 733 ✅ 0 💤 0 ❌

Results for commit dffde5d.

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.

pyroot can trigger clang assertion failure on enum with value too big to fit in int64_t

3 participants