Artifacts Associated With Ticket 1563836
Ticket change [e85f408d96] (rid 104635) by dgp on 2006-09-23 01:46:57:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% package vcompare [expr 1<<31] [expr (1<<31)-1] -1
- foundin initialized to: "obsolete: 8.5a5"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "39. Package Manager"
- title initialized to: "package vcompare int overflow"
- type initialized to: "Bug"
Ticket change [a88fc6eca7] (rid 99018) by andreas_kupries on 2006-09-26 04:29:46:
- icomment:
Logged In: YES user_id=75003 Do we really wish to extend version numbers beyond 32 bit ? I.e. allow bignums ? Did we discuss this ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [767e480512] (rid 105601) by nobody on 2006-09-26 09:19:13:
- icomment:
Logged In: NO Yes. As Lars pointed out, simply doing the comparison on strings scales fine.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [41dbf956bf] (rid 116264) by andreas_kupries on 2006-09-26 23:33:15:
- icomment:
Logged In: YES user_id=75003 Thinking about it I can agree that string compare is good enough. The only problem a strcmp would have are leading zeros, and those are disallowed in version numbers and checked for early.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [d6fd0b59a4] (rid 123901) by dgp on 2006-09-26 23:39:55:
- icomment:
Logged In: YES user_id=80530 leading zeros are disallowed?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f64e6fdc54] (rid 130276) by andreas_kupries on 2006-09-26 23:52:40:
- icomment:
Logged In: YES user_id=75003 I shouldn't make statements like this early in the morning. Checking the code I find nothing to support my assertion. No idea why I was thinking this. :( Shaking head. Ok, this however means that 1.0002.3 is a valid version number, and now a plain strcmp would consider it different from 1.2.3. Numerically however they are equivalent. If we want numerical checking our code has to skip leading "0"-digits before invoking the strcmp.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [74ecc20523] (rid 105303) by andreas_kupries on 2006-09-28 03:22:59:
- closedate changed to: "2006-09-27T20:22:59"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Fixed, and commited to Head. No backport to 8.4.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"
Ticket change [2c7dcd74ed] (rid 118913) by dgp on 2006-09-28 21:52:13:
- icomment:
Logged In: YES user_id=80530 Something seriously wrong with that patch: % package require Tcl 8.5 version conflict for package "Tcl": have 8.5a5, need 8.5
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "8"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [f34b748acd] (rid 129685) by dgp on 2006-09-28 22:05:41:
- icomment:
Logged In: YES user_id=80530 dgpok, I think I found it [11:05]dgpCallers assume CompareVersions() returns value from set {-1, 0, 1} [11:05]dgpAfter revision, it can return other integers. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e183139869] (rid 87462) by dgp on 2006-09-28 22:13:12:
- closedate changed to: "2006-09-28T15:13:12"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fix committed.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"
Ticket change [0ef05ae827] (rid 94709) by andreas_kupries on 2006-09-28 23:02:54:
- icomment:
Logged In: YES user_id=75003 Thanks for noting the problem and fixing it. In my defense, this was not caught when I ran the testsuite. Which however means that we should extend it and convert this problem into an additional testcase.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [42f41b3411] (rid 116467) by andreas_kupries on 2006-09-28 23:11:14:
- icomment:
Logged In: YES user_id=75003 Actually, the error does not happen for me at all. I haven't updated my sandbox yet to include your fix, and if I do the 'package require Tcl 8.5' I get 8.5a5 returned and no error. Could it be that the strcmp result is platform dependent ? And on linux it stays in the set {-1,0,1} ? Wheras your platform allows any numbers ? Sigh. So even adding a testcase may not catch the problem on all platforms :( Still, adding it makes sense for the platforms which would catch it. - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment: