Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #19196

Closed (moved)
(moved)
Open
Created May 28, 2016 by teor@teor

[prop250] Shared random version parsing fails on 32 bit

In dgoulet's srv-testing-2, git 0234595:

The original patch to sr_parse_commit was:

-  version = (uint32_t) tor_parse_long(value, 10, 1, UINT32_MAX, NULL, NULL);
+  version = (uint32_t) tor_parse_ulong(value, 10, 1, UINT32_MAX, NULL, NULL);

Since this is a regression, it's worth noting that the unit test shared-random/sr_commit tests version parsing as part of commit parsing. It will fail on 32 bit platforms if we make this mistake again. (I can't see any way to make it fail on 64-bit platforms - using fixed-size integers with a function that takes platform-dependent-size integers is inherently error-prone, see #19063 (moved).)

Also, since this is a regression, can you please make sure that no other patches from the last few comments in #16943 (moved) were dropped?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking