tock / tock/tockloader

Tockloader and Tockloader-rs produce different outputs

Open
#125 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
44
Forks
59
Avg merge
20h 33m
Merged PRs (30d)
2

Description

I noticed a discrepancy between the Rust and Python Tockloade-rs where, for the init_fn_offset value, the Rust version (tockloader-rs/src/tbf_parser/types.rs at line 989) adds the full header size to the offset while the Python version (tockloader/tbfh.py at line 74) does not, and a similar issue exists for the protected_size value in the same files (Rust at line 959 and Python at line 75), which together cause a mismatch in the outputs between the two tools.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the parsing logic at tockloader-rs/src/tbf_parser/types.rs lines 959 and 989 with tockloader/tbfh.py lines 74-75. Trace how protected_size and init_fn_offset are calculated, then verify that both tools produce matching values and outputs for the same TBF input.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
embedded-iot, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.