frida 17.8.0 → 17.8.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida",
3
- "version": "17.8.0",
3
+ "version": "17.8.1",
4
4
  "authors": [
5
5
  "Frida Developers"
6
6
  ],
package/releng/deps.toml CHANGED
@@ -1,5 +1,5 @@
1
1
  [dependencies]
2
- version = "20260216"
2
+ version = "20260311"
3
3
  bootstrap_version = "20250801"
4
4
 
5
5
  [ninja]
@@ -41,9 +41,10 @@ def init_machine_config(machine: MachineSpec,
41
41
 
42
42
  android_build_os = "darwin" if build_machine.os == "macos" else build_machine.os
43
43
  android_build_arch = "x86_64" if build_machine.os in {"macos", "linux"} else build_machine.arch
44
- android_api = 19 if machine.arch in {"x86", "arm"} else 21
44
+ android_api = 21
45
45
 
46
46
  llvm_bindir = ndk_root / "toolchains" / "llvm" / "prebuilt" / f"{android_build_os}-{android_build_arch}" / "bin"
47
+ libcxx_include_dir = llvm_bindir.parent / "sysroot" / "usr" / "include" / "c++" / "v1"
47
48
 
48
49
  binaries = config["binaries"]
49
50
  for (identifier, tool_name, *rest) in NDK_BINARIES:
@@ -80,14 +81,17 @@ def init_machine_config(machine: MachineSpec,
80
81
  read_envflags = lambda name: shlex.split(environ.get(name, ""))
81
82
 
82
83
  common_flags += ARCH_COMMON_FLAGS.get(machine.arch, [])
84
+
83
85
  c_like_flags += ARCH_C_LIKE_FLAGS.get(machine.arch, [])
84
86
  c_like_flags += read_envflags("CPPFLAGS")
87
+
88
+ if _needs_patched_fstream(machine, android_api):
89
+ overlay_dir = _generate_libcpp_overlay(libcxx_include_dir, outdir)
90
+ cxx_like_flags += ["-isystem", str(overlay_dir)]
91
+
85
92
  linker_flags += ARCH_LINKER_FLAGS.get(machine.arch, [])
86
93
  linker_flags += read_envflags("LDFLAGS")
87
94
 
88
- if android_api < 24:
89
- cxx_like_flags += ["-D_LIBCPP_HAS_NO_OFF_T_FUNCTIONS"]
90
-
91
95
  constants = config["constants"]
92
96
  constants["common_flags"] = strv_to_meson(common_flags)
93
97
  constants["c_like_flags"] = strv_to_meson(c_like_flags)
@@ -103,6 +107,63 @@ def init_machine_config(machine: MachineSpec,
103
107
  options["b_lundef"] = "true"
104
108
 
105
109
 
110
+ def _needs_patched_fstream(machine: MachineSpec, android_api: int) -> bool:
111
+ return machine.pointer_size == 4 and android_api < 24
112
+
113
+
114
+ def _generate_libcpp_overlay(libcxx_include_dir: Path, outdir: Path) -> Path:
115
+ src = libcxx_include_dir / "fstream"
116
+ if not src.exists():
117
+ raise FileNotFoundError(f"Missing libc++ header: {src}")
118
+
119
+ overlay_dir = outdir / "libcpp-overlay"
120
+ overlay_dir.mkdir(parents=True, exist_ok=True)
121
+
122
+ patched = src.read_text(encoding="utf-8")
123
+ patched = _patch_fstream_header(patched)
124
+
125
+ dst = overlay_dir / "fstream"
126
+ old_contents = dst.read_text(encoding="utf-8") if dst.exists() else None
127
+ if old_contents != patched:
128
+ dst.write_text(patched, encoding="utf-8")
129
+
130
+ return overlay_dir
131
+
132
+
133
+ def _patch_fstream_header(header: str) -> str:
134
+ old_fseek = """# elif defined(_NEWLIB_VERSION)
135
+ return fseek(__file, __offset, __whence);
136
+ # else
137
+ return ::fseeko(__file, __offset, __whence);
138
+ # endif"""
139
+
140
+ new_fseek = """# elif defined(_NEWLIB_VERSION) || (defined(__ANDROID__) && __SIZEOF_POINTER__ == 4 && __ANDROID_API__ < 24)
141
+ return fseek(__file, __offset, __whence);
142
+ # else
143
+ return ::fseeko(__file, __offset, __whence);
144
+ # endif"""
145
+
146
+ old_ftell = """# elif defined(_NEWLIB_VERSION)
147
+ return ftell(__file);
148
+ # else
149
+ return ftello(__file);
150
+ # endif"""
151
+
152
+ new_ftell = """# elif defined(_NEWLIB_VERSION) || (defined(__ANDROID__) && __SIZEOF_POINTER__ == 4 && __ANDROID_API__ < 24)
153
+ return ftell(__file);
154
+ # else
155
+ return ftello(__file);
156
+ # endif"""
157
+
158
+ result = header.replace(old_fseek, new_fseek)
159
+ result = result.replace(old_ftell, new_ftell)
160
+
161
+ if result == header:
162
+ raise ValueError("Failed to patch libc++ fstream header; expected patterns not found")
163
+
164
+ return result
165
+
166
+
106
167
  class NdkNotFoundError(Exception):
107
168
  pass
108
169
 
@@ -111,7 +172,7 @@ class NdkVersionError(Exception):
111
172
  pass
112
173
 
113
174
 
114
- NDK_REQUIRED = 25
175
+ NDK_REQUIRED = 29
115
176
 
116
177
  NDK_BINARIES = [
117
178
  ("c", "clang"),
@@ -1,6 +1,6 @@
1
1
  [wrap-git]
2
2
  url = https://github.com/frida/frida-core.git
3
- revision = 17.8.0
3
+ revision = 17.8.1
4
4
  depth = 1
5
5
 
6
6
  [provide]