[ 
https://issues.apache.org/jira/browse/LOGCXX-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13902799#comment-13902799
 ] 

Thorsten Schöning edited comment on LOGCXX-425 at 2/16/14 8:13 PM:
-------------------------------------------------------------------

     [exec] cacheddateformattestcase:  regionMatches: 654 0 00:00:00,654 9 3
     [exec] regionMatches: 000 0 00:00:00,000 9 3
     [exec] regionMatches: 000 0 00:00:00,000 9 3
     [exec] regionMatches: 654 0 00:00:01,654 9 3
     [exec] regionMatches: 415 0 00:00:01,415 9 3
     [exec] regionMatches: 000 0 00:00:01,000 9 3
     [exec] regionMatches: 654 0 00:00:00,654 9 3
     [exec] regionMatches: 000 0 00:00:00,000 9 3
     [exec] regionMatches: 000 0 00:00:00,000 9 3
     [exec] regionMatches: 654 0 19:00:00,654 9 3
     [exec] regionMatches: 000 0 19:00:00,000 9 3
     [exec] regionMatches: 000 0 19:00:00,000 9 3
     [exec] regionMatches: 654 0 00:00:00,654 9 3
     [exec] regionMatches: 000 0 00:00:00,000 9 3
     [exec] regionMatches: 000 0 00:00:00,000 9 3
     [exec] regionMatches: 654 0 00:00:01,654 9 3
     [exec] regionMatches: 423 0 00:00:01,423 9 3
     [exec] regionMatches: 000 0 00:00:01,000 9 3
     [exec] regionMatches: 654 -6 Mon, Jul 03, 02:00:00.654 +0200 22 9
     [exec] regionMatches: 654 -6 îÄ, 7 03, 02:00:00.654 +0200 18 9
     [exec] regionMatches: 654 0 2004-07-04 00:00:00,654 20 3
     [exec] regionMatches: 000 0 2004-07-04 00:00:00,000 20 3
     [exec] regionMatches: 000 0 2004-07-04 00:00:00,000 20 3
     [exec] regionMatches: 654 0 2004-07-03 18:00:00,654 20 3
     [exec] regionMatches: 000 0 2004-07-03 18:00:00,000 20 3
     [exec] regionMatches: 000 0 2004-07-03 18:00:00,000 20 3
     [exec] murksdreckregionMatches: 654 -8 October 654 Tuesday 8 11
     [exec] regionMatches: 654 0 2000-07-04 02:00:00,654 20 3
     [exec] regionMatches: 000 0 2000-07-04 02:00:00,000 20 3
     [exec] regionMatches: 000 0 2000-07-04 02:00:00,000 20 3
     [exec] regionMatches: 654 0 02:00:00,654 9 3
     [exec] regionMatches: 000 0 02:00:00,000 9 3
     [exec] regionMatches: 000 0 02:00:00,000 9 3
     [exec] regionMatches: 654 -13 00:00:00,654 00:00:00,654 9 16
     [exec] FAILED 4 of 19
     [exec] Failed Tests                Total   Fail    Failed %
     [exec] ===================================================
     [exec] cacheddateformattestcase               19      4     21.05%
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] Line -1: Unexpected std::exception: invalid string position
     [exec] Line -1: Unexpected std::exception: invalid string position
     [exec] Line -1: Unexpected std::exception: invalid string position
     [exec] Line -1: Unexpected std::exception: invalid string position

bool CachedDateFormat::regionMatches(
    const LogString& target,
    size_t toffset,
    const LogString& other,
    size_t ooffset,
    size_t len) {
wprintf(L"regionMatches: %s %i %s %i %i\r\n", target.c_str(), toffset, 
other.c_str(), ooffset, len);
    return target.compare(toffset, len, other, ooffset, len) == 0;
}

There's a negative offset whcih is invalid of course.


was (Author: tschoening):
     [exec] cacheddateformattestcase:  regionMatches: 6 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 6 0 0 9 3
     [exec] regionMatches: 4 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 6 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 6 0 1 9 3
     [exec] regionMatches: 0 0 1 9 3
     [exec] regionMatches: 0 0 1 9 3
     [exec] regionMatches: 6 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 6 0 0 9 3
     [exec] regionMatches: 4 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 6 -6 M 22 9
     [exec] regionMatches: 6 -6g, 18 9
     [exec] regionMatches: 6 0 2 20 3
     [exec] regionMatches: 0 0 2 20 3
     [exec] regionMatches: 0 0 2 20 3
     [exec] regionMatches: 6 0 2 20 3
     [exec] regionMatches: 0 0 2 20 3
     [exec] regionMatches: 0 0 2 20 3
     [exec] murksdreckregionMatches: 6 -8 O 8 11
     [exec] regionMatches: 6 0 2 20 3
     [exec] regionMatches: 0 0 2 20 3
     [exec] regionMatches: 0 0 2 20 3
     [exec] regionMatches: 6 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 0 0 0 9 3
     [exec] regionMatches: 6 -13 0 9 16
     [exec] FAILED 4 of 19
     [exec] Failed Tests                Total   Fail    Failed %
     [exec] ===================================================
     [exec] cacheddateformattestcase               19      4     21.05%
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] log4cxx: Attempted to append to closed appender named [].
     [exec] Line -1: Unexpected std::exception: invalid string position
     [exec] Line -1: Unexpected std::exception: invalid string position
     [exec] Line -1: Unexpected std::exception: invalid string position
     [exec] Line -1: Unexpected std::exception: invalid string position

bool CachedDateFormat::regionMatches(
    const LogString& target,
    size_t toffset,
    const LogString& other,
    size_t ooffset,
    size_t len) {
printf("regionMatches: %s %i %s %i %i\r\n", target.c_str(), toffset, 
other.c_str(), ooffset, len);
    return target.compare(toffset, len, other, ooffset, len) == 0;
}

There's a negative offset whcih is invalid of course.

> exceptions in CachedDateFormatTestCase after LOGCXX-420
> -------------------------------------------------------
>
>                 Key: LOGCXX-425
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-425
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Thorsten Schöning
>            Assignee: Thorsten Schöning
>
> The changes in LOGCXX-420 seemm to produce exceptions in 
> CachedDateFormatTestCase:
> $ ./src/test/cpp/testsuite -v cacheddateformattestcase
> ...
> Line -1: Unexpected std::exception: basic_string::compare
> Line -1: Unexpected std::exception: basic_string::compare
> Line -1: Unexpected std::exception: basic_string::compare
> http://markmail.org/search/list:org.apache.logging.log4cxx-dev#query:list%3Aorg.apache.logging.log4cxx-dev%20from%3A%22Rhys%20Ulerich%22+page:2+mid:7py3gsj34snyzc5u+state:results



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to