Uncaught alloc Exception in Snappy on Windows

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.0.0-rc9
    • Component/s: Storage, WiredTiger
    • Environment:
      Windows Server 2012 R2
    • Fully Compatible
    • Windows
    • Hide

      manually throw a std::bad_alloc() in place of

          if (scratch_output == NULL) {
            scratch_output = new char[max_output];
          }
      

      around line 945 in snappy.cc.

      We may need to keep a counter to only throw after 50 or so calls, otherwise WT won't start.

      Show
      manually throw a std::bad_alloc() in place of if (scratch_output == NULL) { scratch_output = new char[max_output]; } around line 945 in snappy.cc. We may need to keep a counter to only throw after 50 or so calls, otherwise WT won't start.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      snappy.cc could throw an exception if an allocation for a char array fails in the function "Compress". This exception is not caught.

      There's a code review for a different change that affects this line of code but does not address this issue.
      link to CR here: http://codereview.10gen.com/6078463630901248/patch/5629499534213120/5066549580791808
      link to SERVER ticket here: SERVER-17299

      This only affects Windows since other OSes don't use this function.

      mongod log is attached in the comments

            Assignee:
            Michael Cahill (Inactive)
            Reporter:
            Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: