Bug 262431
| Summary: | [Hardening] Make Vector::uncheckedAppend() an alias to Vector::append() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
| Component: | Web Template Framework | Assignee: | Chris Dumez <cdumez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Chris Dumez
Make Vector::uncheckedAppend() an alias to Vector::append() so that bounds checking happens. This is part of our effort to make our code safer.
This tested as performance neutral on Speedometer, MotionMark and JetStream on various A/B bots. However, I plan to monitor the bots after landing to be safe. If it sticks, I'll follow-up to get rid of Vector::uncheckedAppend() completely.
Note that in order to maintain the performance, WTF::map(), Vector::map(), copyToVector() & copyToVectorOf() still rely on a private unsafeAppendWithoutCapacityCheck() function.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/18458
EWS
Committed 268700@main (1b624bea4bbb): <https://commits.webkit.org/268700@main>
Reviewed commits have been landed. Closing PR #18458 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/116299437>