diff --git a/bindings/otel-thread-ctx.cc b/bindings/otel-thread-ctx.cc index 0d3357a1..b7c7dfd4 100644 --- a/bindings/otel-thread-ctx.cc +++ b/bindings/otel-thread-ctx.cc @@ -348,6 +348,7 @@ void CtxWrap::DrainLive(void* arg) { if (!p->handle_.IsEmpty()) { SetAlignedPointerInInternalField(p->handle_.Get(isolate), 0, nullptr); } + std::atomic_signal_fence(std::memory_order_acq_rel); Destroy(p); p = next; } diff --git a/ts/src/otel-thread-ctx.ts b/ts/src/otel-thread-ctx.ts index c533f8a5..d2a4c1e7 100644 --- a/ts/src/otel-thread-ctx.ts +++ b/ts/src/otel-thread-ctx.ts @@ -155,7 +155,7 @@ const SCHEMA_VERSION = 'nodejs_v1_dev'; // (no V8 pointer compression, no sandbox); the reader is Linux-only per // the OTEP anyway, so the fallbacks just keep processContextAttributes // consistent in shape. -let JS_OBJECT_RECORD_OFFSET = 24; +let JS_OBJECT_RECORD_OFFSET = 0x18; let TAGGED_SIZE = 8; let JS_MAP_TABLE_OFFSET = 0x18; let ORDERED_HASH_MAP_HEADER_SIZE = 0x10; diff --git a/ts/test/test-otel-thread-ctx.ts b/ts/test/test-otel-thread-ctx.ts index ce3e057b..372a5fff 100644 --- a/ts/test/test-otel-thread-ctx.ts +++ b/ts/test/test-otel-thread-ctx.ts @@ -940,7 +940,7 @@ function captureBytes(opts: { const pca = getProcessContextAttributes(keys); strictAssert.equal(pca['threadlocal.schema_version'], 'nodejs_v1_dev'); strictAssert.deepEqual(pca['threadlocal.attribute_key_map'], keys); - strictAssert.equal(pca['threadlocal.js_object_record_offset'], 24); + strictAssert.equal(pca['threadlocal.js_object_record_offset'], 0x18); strictAssert.equal(pca['threadlocal.tagged_size'], 8); strictAssert.equal(pca['threadlocal.js_map_table_offset'], 0x18); strictAssert.equal(