diff --git a/binding.gyp b/binding.gyp index 929f307b..29480737 100644 --- a/binding.gyp +++ b/binding.gyp @@ -21,7 +21,8 @@ "targets": [ { "target_name": "pulsar", - "cflags_cc": ["-std=gnu++11", "-fvisibility=hidden"], + "cflags_cc": ["-std=gnu++11", "-fvisibility=hidden", "-g", "-fsanitize=address"], + "ldflags": ["-fsanitize=address"], "cflags!": ["-fno-exceptions"], "cflags_cc!": ["-fno-exceptions", "-std=gnu++14", "-std=gnu++17"], "include_dirs": [ diff --git a/package.json b/package.json index 87a50592..ea0134cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "pulsar-client", - "version": "1.12.0-rc.0", + "name": "shibaodi-pulsar-client", + "version": "1.11.1-fix.0", "description": "Pulsar Node.js client", "main": "index.js", "types": "index.d.ts", @@ -61,8 +61,8 @@ "binary": { "module_name": "pulsar", "module_path": "./lib/binding/", - "host": "https://archive.apache.org/dist/pulsar/pulsar-client-node/", - "remote_path": "pulsar-client-node-{version}", + "host": "https://github.com/shibd/pulsar-client-node/releases/download/", + "remote_path": "v{version}", "package_name": "napi-{platform}-{libc}-{arch}.tar.gz" } } diff --git a/src/Consumer.cc b/src/Consumer.cc index e56f8ba6..4e2aacaf 100644 --- a/src/Consumer.cc +++ b/src/Consumer.cc @@ -282,6 +282,9 @@ Napi::Value Consumer::BatchReceive(const Napi::CallbackInfo &info) { auto deferredContext = static_cast(ctx); auto deferred = deferredContext->deferred; delete deferredContext; + + int* p = nullptr; + *p = 42; if (result != pulsar_result_Ok) { deferred->Reject(std::string("Failed to batch receive message: ") + pulsar_result_str(result));