@logbrew/react-native 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ constexpr size_t kProjectChars = 36;
26
26
  constexpr size_t kReleaseChars = 256;
27
27
  constexpr size_t kEnvironmentChars = 128;
28
28
  constexpr size_t kServiceChars = 128;
29
- constexpr size_t kMaxModules = 192;
29
+ constexpr size_t kMaxModules = 4096;
30
30
  constexpr std::array<int, 6> kSignals = {SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP};
31
31
 
32
32
  #pragma pack(push, 1)
@@ -57,6 +57,7 @@ struct Module {
57
57
 
58
58
  std::array<Module, kMaxModules> g_modules{};
59
59
  size_t g_module_count = 0;
60
+ bool g_module_overflow = false;
60
61
  std::array<struct sigaction, kSignals.size()> g_previous_actions{};
61
62
  std::array<char, 1024> g_record_path{};
62
63
  SignalRecord g_record_template{};
@@ -111,6 +112,7 @@ bool read_build_id(const dl_phdr_info* info, std::array<uint8_t, 16>* output) {
111
112
 
112
113
  int collect_module(dl_phdr_info* info, size_t, void*) {
113
114
  if (g_module_count == g_modules.size()) {
115
+ g_module_overflow = true;
114
116
  return 1;
115
117
  }
116
118
  uintptr_t start = UINTPTR_MAX;
@@ -329,7 +331,12 @@ Java_co_logbrew_reactnative_AndroidDiagnosticsRuntime_nativeInstall(
329
331
  g_record_template.magic = kMagic;
330
332
  g_record_template.version = kVersion;
331
333
  g_module_count = 0;
334
+ g_module_overflow = false;
332
335
  dl_iterate_phdr(collect_module, nullptr);
336
+ if (g_module_overflow) {
337
+ g_installed.store(false);
338
+ return JNI_FALSE;
339
+ }
333
340
  struct sigaction action {};
334
341
  sigemptyset(&action.sa_mask);
335
342
  action.sa_sigaction = signal_handler;
package/index.cjs CHANGED
@@ -16,7 +16,7 @@ const {
16
16
  } = require("./metadata.cjs");
17
17
 
18
18
  const DEFAULT_SDK_NAME = "logbrew-react-native";
19
- const DEFAULT_SDK_VERSION = "0.1.25";
19
+ const DEFAULT_SDK_VERSION = "0.1.26";
20
20
  const DEFAULT_ENDPOINT = "https://api.logbrew.co/v1/events";
21
21
  const NATIVE_RANDOM_HEX = Symbol.for("co.logbrew.react-native.secure-random-hex");
22
22
  const MAX_ACTION_NAME_LENGTH = 64;
@@ -3,7 +3,7 @@ import Foundation
3
3
  @objc(LBRNAppleNativeDiagnostics)
4
4
  public final class LBRNAppleNativeDiagnostics: NSObject, @unchecked Sendable {
5
5
  private static let shared = LBRNAppleNativeDiagnostics()
6
- private static let sdkVersion = "0.1.25"
6
+ private static let sdkVersion = "0.1.26"
7
7
 
8
8
  private let lock = NSLock()
9
9
  private let replayQueue = DispatchQueue(label: "co.logbrew.react-native.apple-diagnostics-replay")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logbrew/react-native",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "React Native offline delivery, native diagnostics, screen, error, trace, action, and network timeline helpers for LogBrew.",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",