ActiveMQ C++ Client
  1. ActiveMQ C++ Client
  2. AMQCPP-529

Crash in Threads due to small stack size (set to 32768 bytes)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.8.1
    • Fix Version/s: 3.8.3, 3.9.0
    • Component/s: Decaf
    • Labels:
      None
    • Environment:

      linux50

      Description

      Using version 3.8.1 of activemq-cpp (after using version 3.4.5) - we have suffered a crash in code running in amq threads.
      Investigation shows that this happens when trying to use a char[] buffer on stack of size > 16384 , probably due to the stack size being of size 32768.

      Thread::Thread() constructors call initializeSelf() with stackSize=(-1), which
      in turn call createThreadInstance() with negative stackSize value (hence using PLATFORM_DEFAULT_STACK_SIZE).

      Relevant code below:
      ----------------------
      #define PLATFORM_DEFAULT_STACK_SIZE 0x8000
      -----------------------
      void createThreadInstance(ThreadHandle* thread, long long stackSize, int priority, bool suspended, threadingTask threadMain, void* threadArg) {
      if (stackSize <= 0)

      { stackSize = PLATFORM_DEFAULT_STACK_SIZE; }

      ...
      }
      ----------------------

        Activity

        omri zomet created issue -
        Timothy Bish made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Fix Version/s 3.9.0 [ 12324974 ]
        Fix Version/s 3.8.3 [ 12325744 ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Timothy Bish
            Reporter:
            omri zomet
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development