src: avoid union type-punning in trace values · nodejs/node@410093d · GitHub
Skip to content

Commit 410093d

Browse files
XadillaXaduh95
authored andcommitted
src: avoid union type-punning in trace values
Replace TraceValueUnion with memcpy-based object representation copying to avoid reading inactive union members. Generalize integral values to support all integral and enum types. This follows the equivalent V8 fix in CL 1886918. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/1886918 Fixes: #57033 Signed-off-by: XadillaX <i@2333.moe> PR-URL: #65933 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent 7cf4488 commit 410093d

2 files changed

Lines changed: 99 additions & 45 deletions

File tree

‎src/tracing/trace_event_legacy_inl.h‎

Lines changed: 30 additions & 45 deletions

‎test/cctest/test_trace_event.cc‎

Lines changed: 69 additions & 0 deletions

0 commit comments

Comments
 (0)