Ticket #3348: bzip2_test.cpp

File bzip2_test.cpp, 526 bytes (added by basilevs@…, 13 years ago)

This sample program demonstrates the SEGV at the end of main() fucntion.

Line 
1/*
2 * bzip2_t.cpp
3 *
4 * Created on: 17.08.2009
5 * Author: Gulevich
6 */
7
8#include <boost/iostreams/filtering_stream.hpp>
9#include <boost/iostreams/filter/bzip2.hpp>
10#include <boost/iostreams/device/file.hpp>
11
12int main() {
13 using namespace boost::iostreams;
14 using namespace std;
15 filtering_istream s;
16 file f("../FileListing/filelisting.xml.bz2", ios_base::in | ios_base::binary);
17// s.imbue(locale("C"));
18 s.push(bzip2_decompressor());
19 s.push(f);
20 return 0;
21 //The program fails with SEGV here.
22}