markcox / snappy

Automatically exported from code.google.com/p/snappy
Other
0 stars 0 forks source link

bad_alloc exception not caught in snappy.cc::Compress #94

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Snappy currently doesn't seem to handle out of memory situations, is there a 
plan to make it more robust to allocation failures? Thanks.

What steps will reproduce the problem?
1. throw a "bad_alloc" in place of any "new char[...]" in Compress in snappy.cc
2. call snappy_compress using the built-in C interface
3.

What is the expected output? What do you see instead?
a std::bad_alloc exception is thrown

What version of the product are you using? On what operating system?
Snappy 1.1.2, Windows Server 2012 R2

Please provide any additional information below.

Original issue reported on code.google.com by robert....@10gen.com on 27 Feb 2015 at 4:40