Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6aa0078
feat(debug-files): --type elf accepts directories of .so files
krassx Oct 7, 2026
7ace775
fix(debug-files): empty ELF directory exits 10; don't descend dir sym…
krassx Oct 7, 2026
a741636
fix(debug-files): fail ELF dir scan on any I/O error; harden tests
krassx Oct 7, 2026
d7655c5
perf(upload): stream the presigned PUT body and the SHA-1 instead of …
krassx Oct 7, 2026
20a7eb3
perf(elf): memory-map libraries for the identity scan instead of read…
krassx Oct 7, 2026
5dd0fd6
docs(changelog): note the streaming/mmap memory reduction
krassx Oct 7, 2026
7b454ac
perf: stop loading whole files into memory across the upload/identify…
krassx Oct 7, 2026
530ba3c
perf(sourcemaps): stream map JSON with struson instead of a serde_jso…
krassx Oct 7, 2026
fed5bb2
perf(inject): edit JS bundles in place; differential + on-disk tests
krassx Oct 7, 2026
32cc797
test: file handling through the binary, packer/mmap/stream units, mem…
krassx Oct 7, 2026
c5754f0
test+fix: broken-file coverage (JSON, ELF, Mach-O/DWARF, PDB, zip, pl…
krassx Oct 7, 2026
01e17d9
test(elf): gate the unix-only fixture helper (dead code is an error o…
krassx Oct 7, 2026
1346a32
Merge branch 'feat/elf-directory-input' into perf/stream-uploads-low-…
krassx Oct 7, 2026
bdd4794
Merge branch 'perf/stream-uploads-low-memory' into perf/low-memory-audit
krassx Oct 7, 2026
eee6fbe
Merge branch 'perf/low-memory-audit' into perf/json-streaming
krassx Oct 7, 2026
500e5f6
Merge branch 'perf/json-streaming' into perf/inject-append-in-place
krassx Oct 7, 2026
1ab176a
docs(elf): state the mmap contract - directories must not be written …
krassx Oct 7, 2026
362fa0d
Merge perf/stream-uploads-low-memory; fix(dsym): drop the stale 1 GiB…
krassx Oct 7, 2026
650d52a
Merge branch 'perf/low-memory-audit' into perf/json-streaming
krassx Oct 7, 2026
c02b954
fix(inject): rewrite a map's content in place instead of fs::copy fro…
krassx Oct 7, 2026
07fbb33
Merge perf/json-streaming; test: make the inject permissions test non…
krassx Oct 7, 2026
0f388c2
fix(upload): follow 307/308 on streamed PUTs ourselves; correct stale…
krassx Oct 7, 2026
4fec18f
Merge branch 'perf/low-memory-audit' into perf/json-streaming
krassx Oct 7, 2026
3aa9013
fix(mapjson): copy any valid JSON number; anonymous scratch file; war…
krassx Oct 7, 2026
ad5dc54
Merge perf/json-streaming; address Fable review (numbers, plist fallb…
krassx Oct 7, 2026
0d99de4
fix(inject): keep the map's scratch file on the map's own volume
krassx Oct 7, 2026
baec484
Merge branch 'perf/json-streaming' into tip-prep
krassx Oct 7, 2026
7558020
fix(inject): refuse an unusable map BEFORE touching the bundle
krassx Oct 7, 2026
1f1824a
feat(il2cpp): validate LineNumberMappings.json before packing it
krassx Oct 7, 2026
478ce08
fix(il2cpp): ignore the documented __debug-id__ sentinel when validating
krassx Oct 7, 2026
4234404
fix(il2cpp): actually ignore the __debug-id__ sentinel (code + tests …
krassx Oct 7, 2026
5c0e340
Merge remote-tracking branch 'origin/main' into fix/il2cpp-validate-m…
krassx Oct 7, 2026
bab32ed
fix(il2cpp): keep the reader's number guard on; shorten the number in…
krassx Oct 7, 2026
a9c734c
fix(il2cpp): cap the reader's message in the validation error
krassx Oct 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
partial set. See #69.

### Changed
- **`debug-files upload --type il2cpp-linemap` validates `LineNumberMappings.json` before packing
it.** It is checked as a stream (these files run to tens of MB) against the shape the
symbolicator reads, `{cpp_path: {cs_path: {cpp_line: cs_line}}}` with non-negative integer line
numbers. A truncated, wrong or otherwise corrupt file now exits 11 naming the file and the
problem, in a dry run too, and uploads nothing; it used to upload "successfully" and leave every
IL2CPP crash unsymbolicated. The optional top-level `__debug-id__` sentinel is ignored, as the symbolicator ignores it. An empty map is still accepted (with a warning). Integrators that
treated this command's success as proof of a usable map can now rely on it.
- **`--type elf` collects every input before uploading anything.** A corrupt second zip now aborts
(exit 11) before the first zip uploads, instead of after. A path that does not exist now exits
10 (input not found) rather than 11; both are in the no-fallback range.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Takes one or more paths: AGP's pre-built `native-debug-symbols.zip`, and/or dire

#### Unity IL2CPP — `--type il2cpp-linemap`

Uploads `LineNumberMappings.json` (+ sibling `MethodMap.tsv` / `il2cppFileRoot.txt`) as format `il2cpp-linemap`, keyed by the IL2CPP module UUID(s) (`libil2cpp` / `UnityFramework`). See [`docs/unity-il2cpp-linenumber-mappings.md`](docs/unity-il2cpp-linenumber-mappings.md).
Uploads `LineNumberMappings.json` (+ sibling `MethodMap.tsv` / `il2cppFileRoot.txt`) as format `il2cpp-linemap`, keyed by the IL2CPP module UUID(s) (`libil2cpp` / `UnityFramework`). The mappings JSON is validated first (`{cpp_path: {cs_path: {cpp_line: cs_line}}}`, integer line numbers, checked as a stream): a truncated or wrong file exits 11 naming the file and uploads nothing. See [`docs/unity-il2cpp-linenumber-mappings.md`](docs/unity-il2cpp-linenumber-mappings.md).

```sh
bugsee-cli debug-files upload path/to/Symbols/LineNumberMappings.json \
Expand Down
12 changes: 11 additions & 1 deletion src/cli/debug_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ pub enum DebugFileType {
/// Unity IL2CPP `LineNumberMappings.json` (+ MethodMap / il2cppFileRoot)
/// bundle. Keyed by the IL2CPP module UUID(s) (`libil2cpp` / UnityFramework);
/// pass `--uuid` (comma-separated and/or repeated) and/or `--il2cpp-uuid`
/// for multi-ABI.
/// for multi-ABI. The mappings JSON is validated before anything is packed
/// (`{cpp_path: {cs_path: {cpp_line: cs_line}}}` with integer line numbers);
/// a corrupt or wrong file exits 11 and uploads nothing.
Il2cppLinemap,
}

Expand Down Expand Up @@ -1437,6 +1439,14 @@ async fn run_il2cpp_linemap_upload(
let mut already_existed = 0u32;
for bundle in &bundles {
let _ = il2cpp_linemap::read_file_root(bundle, il2cpp_root)?;
// Corrupt mappings must fail HERE, before anything is packed or sent.
let mappings = il2cpp_linemap::validate_mappings(&bundle.json_path)?;
tracing::info!(
cpp_files = mappings.cpp_files,
cs_files = mappings.cs_files,
lines = mappings.lines,
"validated the line-number map"
);
tracing::info!(
path = %bundle.json_path.display(),
uuids = ?uuids,
Expand Down
Loading
Loading