Opened 2 years ago

Closed 2 years ago

#22415 closed defect (fixed)

Format error in our pipeline patch

Reported by: arthuredelstein Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: TorBrowserTeam201705R
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arthuredelstein)

I was building tor-browser.git with --enable-debug and -Werror=format and it revealed a format error in our #5282 patch. The line is

      fprintf(stderr, "WTF-combine: Sent %lld/%lld bytes of %lld combined pipelined requests for host %s\n",
              alreadyPending+totalSent, totalAvailable, reqsSent, ci->Origin());

But the first three arguments after the format string are unsigned long integers, not long long integers.

Child Tickets

Change History (8)

comment:1 Changed 2 years ago by arthuredelstein

Keywords: TorBrowserTeam201705R added; TorBrowserTeam201705 removed
Status: newneeds_review

comment:2 Changed 2 years ago by arthuredelstein

Description: modified (diff)

comment:3 Changed 2 years ago by arthuredelstein

Description: modified (diff)

comment:4 Changed 2 years ago by yawning

NACK. Use PRIu64 from inttypes.h, your patch assumes LP64 and is broken on Windows, which uses LLP64.

comment:5 Changed 2 years ago by yawning

Status: needs_reviewneeds_revision

comment:6 in reply to:  4 Changed 2 years ago by arthuredelstein

Status: needs_revisionneeds_review

Replying to yawning:

NACK. Use PRIu64 from inttypes.h, your patch assumes LP64 and is broken on Windows, which uses LLP64.

Ouch, you are right:
https://github.com/arthuredelstein/tor-browser/commit/22415+1

comment:7 Changed 2 years ago by yawning

lgtm

comment:8 Changed 2 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Applied to tor-browser-52.1.1esr-7.0-1 and tor-browser-52.1.0esr-7.0-2 (commit 7aa5a5c8565273ea41a0c003160226f3229373f6 and e404251e7a4e86981a33be035e7fdb0b7ed42c3b), thanks.

Note: See TracTickets for help on using tickets.