Skip to content

Guard TimeSeriesTracker against non-positive clocks and align integer types. - #607

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_973931607
Draft

Guard TimeSeriesTracker against non-positive clocks and align integer types.#607
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_973931607

Conversation

@copybara-service

Copy link
Copy Markdown

Guard TimeSeriesTracker against non-positive clocks and align integer types.

When clock_.now() is non-positive, multiplication with absl::uint128 wraps
negative values to large unsigned integers (~2^128). Clamp GetCurrentEpoch()
to 0 for non-positive clock values, return size_t consistently to align with
tracker epoch fields, and guard against non-positive traversal intervals.

… types.

When clock_.now() is non-positive, multiplication with absl::uint128 wraps
negative values to large unsigned integers (~2^128). Clamp GetCurrentEpoch()
to 0 for non-positive clock values, return size_t consistently to align with
tracker epoch fields, and guard against non-positive traversal intervals.

PiperOrigin-RevId: 973931607
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.

1 participant