]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/test/test_valgrind_fail_1.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / pool / test / test_valgrind_fail_1.cpp
1 /* Copyright (C) 2011 John Maddock
2 *
3 * Use, modification and distribution is subject to the
4 * Boost Software License, Version 1.0. (See accompanying
5 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6 */
7
8 // Test of bug #2656 (https://svn.boost.org/trac/boost/ticket/2656)
9
10 #include <boost/pool/pool.hpp>
11 #include <iostream>
12 #include <iomanip>
13
14 static const int magic_value = 0x12345678;
15
16 int main()
17 {
18 boost::pool<> p(sizeof(int));
19 int* ptr = static_cast<int*>((p.malloc)());
20 std::cout << *ptr << std::endl; // uninitialized read
21 return 0;
22 }