Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groups.py is not working #4178

Open
onvej-sl opened this issue Sep 13, 2024 · 0 comments
Open

groups.py is not working #4178

onvej-sl opened this issue Sep 13, 2024 · 0 comments
Labels
bug Something isn't working as expected

Comments

@onvej-sl
Copy link
Contributor

The tool core/tools/size/groups.py throws an exception on the main branch

$ nix-shell --run "poetry run make -C core build_firmware && poetry run python core/tools/size/groups.py"

...

scons: `build/firmware/firmware.bin' is up to date.
make: Leaving directory '/trezor-firmware/main/core'
Settings file: /.config/binsize/settings.json
Cache file: /.cache/binsize/DEFINITIONS_CACHE.json
Running CMD: `bloaty -n 0 -d sections,symbols -s vm --csv /trezor-firmware/main/core/build/firmware/firmware.elf`
Running CMD: `arm-none-eabi-nm --line-numbers --radix=dec --size-sort /trezor-firmware/main/core/build/firmware/firmware.elf`
Including data from map file - /trezor-firmware/main/core/build/firmware/firmware.map
Added 166_050 bytes to .flash section from /trezor-firmware/main/core/build/firmware/firmware.map
Decreasing the size of `[section .flash]` by 166_050 bytes
Added 190_817 bytes to .flash2 section from /trezor-firmware/main/core/build/firmware/firmware.map
Decreasing the size of `[section .flash2]` by 190_817 bytes
Adding basic info... Resolving module and function names.
Traceback (most recent call last):
  File "/trezor-firmware/main/core/tools/size/groups.py", line 162, in <module>
    .add_basic_info()
  File "/trezor-firmware/main/.venv/lib/python3.10/site-packages/binsize/lib/binary_size.py", line 111, in add_basic_info
    self.row_data = [
  File "/trezor-firmware/main/.venv/lib/python3.10/site-packages/binsize/lib/binary_size.py", line 112, in <listcomp>
    self.row_handler_factory(row).add_basic_info(row) for row in self.row_data
  File "/trezor-firmware/main/.venv/lib/python3.10/site-packages/binsize/lib/row_handler_common.py", line 55, in add_basic_info
    row.module_name, row.func_name = self._get_module_and_function(row.symbol_name)
  File "/trezor-firmware/main/.venv/lib/python3.10/site-packages/binsize/lib/row_handler_rust.py", line 44, in _get_module_and_function
    symbol_name = get_real_symbol_from_alias(symbol_name)
  File "/trezor-firmware/main/.venv/lib/python3.10/site-packages/binsize/lib/row_handler_rust.py", line 161, in get_real_symbol_from_alias
    possibilities = [part.split()[-1] for part in symbol_name.split(" as ")]
  File "/trezor-firmware/main/.venv/lib/python3.10/site-packages/binsize/lib/row_handler_rust.py", line 161, in <listcomp>
    possibilities = [part.split()[-1] for part in symbol_name.split(" as ")]
IndexError: list index out of range

@onvej-sl onvej-sl added the bug Something isn't working as expected label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
Status: No status
Development

No branches or pull requests

1 participant