[roll] Roll fuchsia [audio][timeline] Prevent underflow/overflow

TimelineFunction::Apply performs int64 subtractions and additions that
could overflow when given extreme input timestamps or offsets, with
compiler-elision potentially eliminating existing overflow checks.

This change performs timestamp delta calculation and offset addition
using 128-bit arithmetic. It also adds a private 128-bit overload to
TimelineRate::Scale with division bounds checks to prevent intermediate
multiplication overflows, while preserving the fast path for standard
64-bit real-time loop values.

Added unittest cases Scale128Bit and ApplyOverflow to validate proper
clamping (when we must) and calculation (when we need not clamp),
across 64-bit and 128-bit boundaries.

Original-Original-Bug: 525552168
Test: fx test audio_lib_timeline_unittests
Original-Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1681202
Original-Original-Revision: df86f7390fe56f6aaa57f96acdf87d6177eb048a
GitOrigin-RevId: 5184769d7d5c36db65e0894dbb107e41ce52556b
Change-Id: I80132d05f2d93d9bddec9cd32671263fcd557b68
1 file changed
tree: 99ac88cc4f12e9dffa6f916cd80da6d00cf690bf
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cobalt
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.