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

SIGFPE in std::valarray::cshift() on empty array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.2, 4.1.3
    • 4.2.0
    • 26. Numerics
    • None
    • all

    Description

      The program below abends with SIGFPE due to division by zero:

      $ cat t.cpp && nice gmake t && ./t
      #include <cassert>
      #include <valarray>

      int main ()
      {
      const std::valarray<int> a;

      a.cshift (1);
      }
      aCC -c -I/nfs/devco/sebor/dev/stdlib/include/ansi -I/usr/include -D_RWSTDDEBUG -mt -D_RWSTD_USE_CONFIG -I/nfs/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.70-15S/include -I/nfs/devco/sebor/dev/stdlib/examples/include -Aa +nostl -g +d +DD64 +w +W392 +W655 +W684 +W818 +W819 +W849 t.cpp
      aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -mt +DD64 -L/build/sebor/aCC-3.70-15S/lib -lstd15S -lm
      Floating point exception (core dumped)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: