Opened 12 years ago

Last modified 7 years ago

#400 closed defect (Fixed)

Tor built with mingw cannot handle large values for MaxAdvertisedBandwidth

Reported by: edmanm Owned by:
Priority: Low Milestone: 0.1.2.x-final
Component: Core Tor/Tor Version: 0.1.2.8-beta
Severity: Keywords:
Cc: edmanm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Tor built with mingw on Windows cannot handle values larger than an unsigned int
for MaxAdvertisedBandwidth, which causes a problem since the default value for
MaxAdvertisedBandwidth is 128 TB.

getinfo version
250-version=0.1.2.8-beta
250 OK
getconf maxadvertisedbandwidth
250 MaxAdvertisedBandwidth=0
setconf maxadvertisedbandwidth=4294967295
250 OK
getconf maxadvertisedbandwidth
250 MaxAdvertisedBandwidth=4294967295
setconf maxadvertisedbandwidth=4294967296
250 OK
getconf maxadvertisedbandwidth
250 MaxAdvertisedBandwidth=0

A side-effect of this problem is that Win32 users of Tor 0.1.2.8-beta are unable to start a
Tor server with Vidalia, unless they manually set a value for
MaxAdvertisedBandwidth to something greater than or equal to 10000 and less
than 2^32.

This problem has existed in previous Tor releases built with mingw (confirmed with
the Tor 0.1.2.7-alpha Win32 binary), but most likely went unnoticed until nickm added a
lower-bound on MaxAdvertisedBandwidth in r9652. The limitation does not
occur if I build my own tor.exe using Microsoft's compiler.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (3)

comment:1 Changed 12 years ago by nickm

Aha. I think I fixed this in r9691. The ChangeLog message was:

  • On mingw, use "%I64u" to printf/scanf 64-bit integers, instead of the usual GCC "%llu". This prevents a bug when saving 64-bit int configuration values on mingw; the high-order 32 bits would get truncated. If the value was then reloaded, disaster would occur. (Fixes bug 400 and maybe also bug 397.)

Does this seem like a plausible explanation for 400 and 397?

comment:2 Changed 12 years ago by nickm

flyspray2trac: bug closed.
Fixed in svn, according to edmanm.

comment:3 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.