[symbolize] Fix bug regarding leading zeros.

This patch removes leading zeros from numbers before parsing them.
This fixes an unknown bug where process ids and thread ids were
probably being handle correctly in the sense that they were unique
but were not being handled correctly in the sense that they were
being mapped to incorrect values. This also eleminates a possible
panic that was found in TC-273 by Todd where due to lossy uart an
'x' was dropped resulting in an '0x8' turning into '08' which
caused the panic because strconv.ParseUint interpeted that number
as octal due to the leading zero even though '8' is not an octal
digit (hence the panic).

Change-Id: Ifa65214622c5cbe7938f247064aebc5daa640996
2 files changed
tree: d637c20bf9bdb63391d5fa607304dfe690a3a516
  1. bloaty/
  2. cache/
  3. cmd/
  4. color/
  5. elflib/
  6. gndoc/
  7. isatty/
  8. logger/
  9. ninjalog/
  10. symbolize/
  11. .gitignore
  12. go.mod
  13. LICENSE
  14. manifest
  15. PATENTS
  16. README.md
README.md

tools

This repo contains tools used in Fuchsia build and development.

Go packages from here are automatically built and uploaded to CIPD and Google Storage by bots using the tools recipe. To add a tool to the build:

  • Edit the bot config.
  • Find the builder_mixins section with name: "tools".
  • Edit the JSON in properties_j to add a string to the packages list:
"fuchsia.googlesource.com/tools/cmd/your-new-tool"