Skip to content

Commit fa76dfd

Browse files
committed
Fix for x86
1 parent d2f064b commit fa76dfd

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

js/addon.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,18 @@ void StoreHash(const v8::FunctionCallbackInfo<v8::Value> &args) {
225225
custom_labels_als_handle = Global<Object>(isolate, obj);
226226
}
227227

228+
// parca-agent can't see the hash symbol on x86 if we don't have
229+
// this function that reads it.
230+
// Is the linker stripping it out due to lack of ever being read?
231+
// Not sure; FWIW `nm` *can* see it.
232+
//
233+
// TODO: Figure out why, so we can get rid of this.
234+
void GetStoredHash(const v8::FunctionCallbackInfo<v8::Value> &args) {
235+
Isolate *isolate = args.GetIsolate();
236+
Local<v8::Integer> ret {v8::Integer::New(isolate, custom_labels_als_identity_hash)};
237+
args.GetReturnValue().Set(ret);
238+
}
239+
228240
#pragma GCC diagnostic push
229241
#pragma GCC diagnostic ignored "-Wcast-function-type"
230242

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polarsignals/custom-labels",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "test",
55
"main": "js/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)