Skip to content

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

Open
Echron wants to merge 1 commit into
jokkedk:masterfrom
Echron:master
Open

Use unsigned int for callCount and costs to avoid integer overflow#162
Echron wants to merge 1 commit into
jokkedk:masterfrom
Echron:master

Conversation

@Echron
Copy link
Copy Markdown

@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
Copy Markdown

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