Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-376

test driver reports incorrect pass rathe due to arithmetic overflow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.1.3
    • 4.2.0
    • Test Driver
    • None
    • all

    Description

      The INACTIVE (pass rate) column displays the wrong result when the total number of assertions is large:

      $ cat t.cpp && make t && ./t
      #include <driver.h>

      int test (int, char**) {
      for (int i = 0; i != 77810809; ++i)
      rw_assert (1, 0, 0, "");
      return 0;
      }

      int main () {
      rw_test (0, 0, 0, 0, 0, test, 0, 0);
      }

      gcc -c -I/build/sebor/stdcxx/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/stdcxx/include -I/build/sebor/stdcxx-gcc-4.1.0-11s/include -I/build/sebor/stdcxx/../rwtest/include -I/build/sebor/stdcxx/tests/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long t.cpp
      gcc t.o -o t -L/build/sebor/stdcxx-gcc-4.1.0-11s/rwtest -lrwtest11s -L/build/sebor/stdcxx-gcc-4.1.0-11s/lib -lstd11s -lsupc++ -lm

      1. INFO (S1) (8 lines):
      2. TEXT:
      3. COMPILER: gcc 4.1.0, _VERSION_ = "4.1.0"
      4. ENVIRONMENT: sparc-v8 running sunos
      5. FILE: (null)
      6. COMPILED: Mar 27 2007, 12:33:59
      7. COMMENT:
        ######################################################
      1. -----------------------------------------+
      2. DIAGNOSTIC ACTIVE TOTAL INACTIVE
      3. -----------------------------------------+
      4. (S1) INFO 1 1 0%
      5. (S7) ASSERTION 0 77810809 -10%
      6. -----------------------------------------+

      Attachments

        Issue Links

          Activity

            People

              sebor Martin Sebor
              sebor Martin Sebor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: