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

__rw::__rw_throw(): operator delete[] called without corresponding operator new[] call

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      All

      Description

      The test below fails:

      -----------------------------------------------------------
      #include <cstddef> // for std::size_t
      #include <assert.h> // for assert
      #include <rw/_error.h> // for __rw_throw_proc, _RWSTD_ERROR_LOCALE_BAD_CAT

      void* operator new[] (std::size_t)
      {
      assert (!"operator new[] unexpectedly called");
      return 0;
      }

      void operator delete[] (void*)
      {
      assert (!"operator delete[] called without operator new[]");
      }

      int main ()
      {
      _rw::rw_throw (_RWSTD_ERROR_LOCALE_BAD_CAT + 1, __FILE_, "main");

      return 0;
      }
      -----------------------------------------------------------

      Assertion failed: !"operator delete[] called without operator new[]", file .\tes
      t.cpp, line 13

      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.
      -----------------------------------------------------------

      The details are here: http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200609.mbox/%3c451BFD6E.6020409@roguewave.com%3e

        Attachments

          Activity

            People

            • Assignee:
              farid Farid Zaripov
              Reporter:
              farid Farid Zaripov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: