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

Use unsigned int for callCount and costs to avoid integer overflow #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Echron
Copy link

@Echron Echron commented Sep 16, 2022

(Tested with XDebug3 profiler file)
I replaced all cost and call count integers with unsigned int (0 to 4,294,967,295). If this is not enough, we can change this to 'unsigned long long' (0 to 18,446,744,073,709,551,615).
https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges?view=msvc-170

@danielbeardsley
Copy link

I think we'll want long long because #132 indicates the new format deals in 10 nanoseconds which could easily get past 32 bit range (40 seconds).

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