Hi all,
I cannot login into MANTIS (I always get an error "APPLICATION WARNING #2702: Your session has become invalidated.") so I report here:
I found a tiny "bug" in Unicode Far in the file "copy.cpp" at line 3261 ("INT64 Size;"): When the "if" clause ("if(CopySparse)") is false then "Size" is not initialised but is being used in the following "while" clause ("while (CopySparse?(Size>0):true)"). While this may work you cannot be 100% sure for all compilers I'd suppose.
MANTIS / Tiny Bug
- Centaur
- Posts: 1083
- Joined: Tue 05 Apr, 2005 20:09
- Location: Novosibirsk, Russia
- Been thanked: 2 times
Re: MANTIS / Tiny Bug
(emphasis mine).C++ Standard ISO/IEC 14882:2003(E) wrote:5.16/1: Conditional expressions group right-to-left. The first expression is implicitly converted to bool (clause 4). It is evaluated and if it is true, the result of the conditional expression is the value of the second expression, otherwise that of the third expression. All side effects of the first expression except for destruction of temporaries (12.2) happen before the second or third expression is evaluated. Only one of the second and third expressions is evaluated.
Similarly:
(again, emphasis mine).C Standard ISO/IEC 9899:1999(E) wrote:6.5.15/4: The first operand is evaluated; there is a sequence point after its evaluation. The second operand is evaluated only if the first compares unequal to 0; the third operand is evaluated only if the first compares equal to 0; the result is the value of the second or third operand (whichever is evaluated), converted to the type described below.[92] If an attempt is made to modify the result of a conditional operator or to access it after the next sequence point, the behavior is undefined.
If you cannot be 100% sure it works on your compiler, you cannot be 100% sure it is a C/C++ compiler.
-
- Posts: 45
- Joined: Wed 30 Apr, 2008 15:31
- Has thanked: 1 time
Re: MANTIS / Tiny Bug
Mmmmh... good catch. I have completely overseen this part. So I better shut up.
- Zeroes
- Мультикопипастер Броадкастер
- Posts: 570
- Joined: Wed 16 Mar, 2005 20:53
- Location: Gomel \ Belarus
- Has thanked: 1 time
- Been thanked: 3 times
- Contact:
Re: MANTIS / Tiny Bug
MortenMacFly
today this bug fixed.
now:
INT64 Size=0;
say thank to DrKnS
today this bug fixed.
now:
INT64 Size=0;
say thank to DrKnS
--- Zeroes & Ones ---
Re: MANTIS / Tiny Bug
If you are behind a web proxy that utilizes multiple exit points, then the session validation will fail, as your session looks like it is being hijacked. In 1.2.0rc1, uncheck the "secure session" option when you log into Mantis to turn off the validation. Alternatively, you can set $g_session_validation = OFF to disable validation for the entire installation, which is not recommended.