Skip to content

🐛 [RUM-1092] Fix stack overflow in generateUUID#4240

Draft
rgaignault wants to merge 1 commit intomainfrom
romanG/fix-max-stack
Draft

🐛 [RUM-1092] Fix stack overflow in generateUUID#4240
rgaignault wants to merge 1 commit intomainfrom
romanG/fix-max-stack

Conversation

@rgaignault
Copy link
Contributor

@rgaignault rgaignault commented Feb 25, 2026

No description provided.

@rgaignault rgaignault requested a review from a team as a code owner February 25, 2026 13:57
@rgaignault rgaignault changed the title 🐛 [RUM-1092] Fix stack overflow in generateUUID by replacing recursive .replace(… 🐛 [RUM-1092] Fix stack overflow in generateUUID Feb 25, 2026
@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 25, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 172.22 KiB 172.27 KiB +52 B +0.03%
Rum Profiler 4.71 KiB 4.71 KiB 0 B 0.00%
Rum Recorder 24.88 KiB 24.88 KiB 0 B 0.00%
Logs 56.29 KiB 56.34 KiB +51 B +0.09%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 127.99 KiB 128.04 KiB +51 B +0.04%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0055 0.004 -27.27%
RUM - add action 0.0183 0.0132 -27.87%
RUM - add error 0.0199 0.0146 -26.63%
RUM - add timing 0.0043 0.0025 -41.86%
RUM - start view 0.0178 0.0141 -20.79%
RUM - start/stop session replay recording 0.001 0.0007 -30.00%
Logs - log message 0.0243 0.0151 -37.86%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 26.68 KiB 27.80 KiB +1.11 KiB
RUM - add action 113.80 KiB 114.79 KiB +1011 B
RUM - add timing 27.68 KiB 26.86 KiB -842 B
RUM - add error 118.69 KiB 117.34 KiB -1.35 KiB
RUM - start/stop session replay recording 25.87 KiB 26.36 KiB +501 B
RUM - start view 509.98 KiB 509.94 KiB -45 B
Logs - log message 44.91 KiB 45.27 KiB +377 B

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 87.50%
Overall Coverage: 77.20% (+0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8b1cef6 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b1cef6c3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

? // eslint-disable-next-line no-bitwise
(parseInt(placeholder, 10) ^ ((Math.random() * 16) >> (parseInt(placeholder, 10) / 4))).toString(16)
: `${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g, generateUUID)
export function generateUUID(): string {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve generateUUID call signature compatibility

generateUUID is re-exported as part of @datadog/browser-core (packages/core/src/index.ts:156), but this change narrows its TypeScript signature from generateUUID(placeholder?: string) to zero arguments only. That is a source-compatible break for any typed consumer currently passing an argument (including undefined), which will now fail with “Expected 0 arguments” even though runtime behavior still accepts extra args. For a bugfix commit, this API break is unexpected and should be avoided by keeping the previous optional parameter in the signature.

Useful? React with 👍 / 👎.

@rgaignault
Copy link
Contributor Author

/to-staging

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 25, 2026

View all feedbacks in Devflow UI.

2026-02-25 14:22:54 UTC ℹ️ Start processing command /to-staging


2026-02-25 14:23:02 UTC ℹ️ Branch Integration: starting soon, merge expected in approximately 20m (p90)

Commit 8b1cef6c3f will soon be integrated into staging-09.


2026-02-25 14:38:21 UTC ℹ️ Branch Integration: this commit was successfully integrated

Commit 8b1cef6c3f has been merged into staging-09 in merge commit 2e6fee834f.

Check out the triggered DDCI request.

If you need to revert this integration, you can use the following command: /code revert-integration -b staging-09

gh-worker-dd-mergequeue-cf854d bot added a commit that referenced this pull request Feb 25, 2026
Integrated commit sha: 8b1cef6

Co-authored-by: rgaignault <roman.gaignault@datadoghq.com>
@rgaignault rgaignault marked this pull request as draft February 25, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant