Coder Social home page Coder Social logo

bloomberg / bde Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 310.0 211.07 MB

Basic Development Environment - a set of foundational C++ libraries used at Bloomberg.

License: Apache License 2.0

C++ 99.63% C 0.02% Perl 0.27% Python 0.01% CMake 0.01% Shell 0.01% Makefile 0.01% Roff 0.05%
allocators cpp cpp-library cpp11 polymorphic-allocators

bde's People

Contributors

abeels avatar adambde avatar apaprocki avatar apl8378 avatar azakhar avatar bottha123 avatar che2 avatar cppguru avatar cwilson9 avatar gbleaney avatar gchassiakos avatar glaptev avatar gstrauss avatar hyrosen avatar jfevold-bbg avatar jmendelsohn avatar joshuaberne avatar khlebnikov avatar kpfleming avatar lalawawa avatar mungog avatar mversche avatar nmyers12 avatar nosybug avatar openbloomberg avatar osubboo avatar phalpern avatar rmgiroux avatar sbreitstein avatar t3nsor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bde's Issues

MSVC 12: Cannot build with multiple parallel jobs

I just compiled BDE (--abi-bits=32) on Windows 8 using Visual C++ 2013. It compiles and all 264 tests pass after I set the number of parallel jobs to 1 (-j 1). Otherwise, I am getting getting an error saying: "fatal error C1041: cannot open program database" and "if multiple CL.EXE write to the same .PDB file, please use /FS". I know MSVC 12 is not one of the supported compilers yet but this might be a trivial issue to address.

bde on ARM architecture

waf configuration line:

CCX=/usr/bin/arm-linux-gnueabi-g++-4.7 CC=/usr/bin/arm-linux-gnueabi-gcc-4.7 waf configure --prefix=/home/federico-garciacruz/devel/allocatorBloomberg/bde/build-arm --out=/home/federico-garciacruz/devel/allocatorBloomberg/bde/build-arm -a 32 -t opt_cpp11

output:
Setting top to : /home/federico-garciacruz/devel/allocatorBloomberg/bde
Setting out to : /home/federico-garciacruz/devel/allocatorBloomberg/bde/build-arm
Checking for 'gcc' (c compiler) : /usr/bin/arm-linux-gnueabi-gcc-4.7
Checking for 'g++' (c++ compiler) : /usr/bin/arm-linux-gnueabi-g++-4.7
os_type : unix
os_name : linux
cpu_type : x86_64
os_ver : 3.13.0
comp_type : gcc
comp_ver : 4.7.3
uplid : unix-linux-x86_64-3.13.0-gcc-4.7.3
ufid : opt_cpp11
prefix : /home/federico-garciacruz/devel/allocatorBloomberg/bde/build-arm
Loading BDE metadata : ok
Evaluating options for 'bsl' : ok
Evaluating options for 'bdl' : ok
Saving configuration : ok
'configure' finished successfully (0.168s)

when I execute waf build I get these errors:

arm-linux-gnueabi-g++-4.7: error: unrecognized command line option ‘-m32’
arm-linux-gnueabi-g++-4.7: error: unrecognized argument in option ‘-march=pentium2’
arm-linux-gnueabi-g++-4.7: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
arm-linux-gnueabi-g++-4.7: error: unrecognized argument in option ‘-mtune=opteron’
arm-linux-gnueabi-g++-4.7: note: valid arguments to ‘-mtune=’ are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a15 cortex-a5 cortex-a7 cortex-a8 cortex-a9 cortex-m0 cortex-m1 cortex-m3 cortex-m4 cortex-r4 cortex-r4f cortex-r5 ep9312 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xscale

Am I missing some configuration setting here?

Build failure on Clang 3.1 looking for __CLANG_GNUC__ and similar symbols

In a build using Clang 3.1 as packaged in openSUSE 12.2, the following errors occur:

../groups/bsl/bsls/bsls_annotation.t.cpp:530:61: error: use of undeclared identifier '__CLANG_GNUC__'
           cout << "BSLS_PLATFORM_CMP_VER_MAJOR" " = " << ((__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)) << endl;;
                                                            ^
../groups/bsl/bsls/bsls_annotation.t.cpp:530:86: error: use of undeclared identifier '__CLANG_GNUC_MINOR__'
           cout << "BSLS_PLATFORM_CMP_VER_MAJOR" " = " << ((__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)) << endl;;
                                                                                     ^

and

../groups/bsl/bsls/bsls_platform.t.cpp:552:30: error: use of undeclared identifier '__CLANG_GNUC__'
            { aSsErT(!(0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)), "0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)", 552); }; if (veryVerbose) cout << "\t""BSLS_PLATFORM_CMP_VER_MAJOR"" = " << (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100) << endl;;
                             ^
../groups/bsl/bsls/bsls_platform.t.cpp:552:55: error: use of undeclared identifier '__CLANG_GNUC_MINOR__'
            { aSsErT(!(0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)), "0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)", 552); }; if (veryVerbose) cout << "\t""BSLS_PLATFORM_CMP_VER_MAJOR"" = " << (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100) << endl;;
                                                      ^
../groups/bsl/bsls/bsls_platform.t.cpp:552:224: error: use of undeclared identifier '__CLANG_GNUC__'
            { aSsErT(!(0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)), "0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)", 552); }; if (veryVerbose) cout << "\t""BSLS_PLATFORM_CMP_VER_MAJOR"" = " << (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100) << endl;;
                                                                                                                                                                                                                               ^
../groups/bsl/bsls/bsls_platform.t.cpp:552:249: error: use of undeclared identifier '__CLANG_GNUC_MINOR__'
            { aSsErT(!(0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)), "0 <= (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100)", 552); }; if (veryVerbose) cout << "\t""BSLS_PLATFORM_CMP_VER_MAJOR"" = " << (__CLANG_GNUC__ * 10000 + __CLANG_GNUC_MINOR__ * 100) << endl;;
                                                                                                                                                                                                                                                        ^

Based on a bit of research, these symbols do not appear to be part of a standard LLVM/Clang build, and thus the code should not be relying on their presence.

'clean' build target missing in makefile

The makefile generated using 'bsl_gyp.py' for Unix does not include a 'clean' build target. The only way I found to do a clean is to delete the generated 'build' directory and recreate it using 'bsl_gyp.py'. Including a 'clean' build target in the generated makefile would make this process much more intuitive.

bslim_printer.cpp fails to compile on OSX due to native_std::num_get

Running Mavericks, I cloned bsl, got gyp to generate me a makefile, and ran make. It gave me the following error:

$ python tools/bsl_gyp.py -f make 
$ cd build
$ make

...snip...

In file included from ../groups/bsl/bslim/bslim_printer.cpp:2:
In file included from ../groups/bsl/bslim/bslim_printer.h:558:
In file included from ../groups/bsl/bsl+bslhdrs/bsl_ostream.h:25:
../groups/bsl/bsl+bslhdrs/bsl_ios.h:50:23: error: no member named 'num_get' in namespace 'std'
    using native_std::num_get;
          ~~~~~~~~~~~~^
In file included from ../groups/bsl/bslim/bslim_printer.cpp:2:
In file included from ../groups/bsl/bslim/bslim_printer.h:558:
../groups/bsl/bsl+bslhdrs/bsl_ostream.h:51:23: error: target of using declaration conflicts with declaration already in scope
    using native_std::num_get;
                      ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/locale:704:24: note: target of using declaration
class _LIBCPP_TYPE_VIS num_get
                       ^
../groups/bsl/bsl+bslhdrs/bsl_ios.h:50:23: note: conflicting declaration
    using native_std::num_get;
                      ^
In file included from ../groups/bsl/bslim/bslim_printer.cpp:10:
../groups/bsl/bsl+bslhdrs/bsl_iomanip.h:50:23: error: target of using declaration conflicts with declaration already in scope
    using native_std::num_get;
                      ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/locale:704:24: note: target of using declaration
class _LIBCPP_TYPE_VIS num_get
                       ^
../groups/bsl/bsl+bslhdrs/bsl_ostream.h:51:23: note: conflicting declaration
    using native_std::num_get;
                      ^
3 errors generated.

The full command it is running is:

  clang++ '-D_REENTRANT' '-D_THREAD_SAFE' '-D__unix' '-DBDE_BUILD_TARGET_EXC' '-DBDE_BUILD_TARGET_MT' '-DBDE_BUILD_TARGET_OPT' '-DNDEBUG' -I../groups/bsl/bsl+bslhdrs -I../groups/bsl/bsl+stdhdrs -I../groups/bsl/bslalg -I../groups/bsl/bsldoc -I../groups/bsl/bslim -I../groups/bsl/bslma -I../groups/bsl/bslmf -I../groups/bsl/bsls -I../groups/bsl/bslscm -I../groups/bsl/bslstl -I../groups/bsl/bsltf  -fasm-blocks -mpascal-strings -O2 -arch x86_64 -Wall -Wextra -Wcast-align -Wcast-qual -Wformat-security -Wformat-y2k -Winit-self -Wno-long-long -Wno-unknown-pragmas -Wpacked -Wpointer-arith -Wwrite-strings -Wno-unused-value -Wno-char-subscripts -Wsign-compare -Wparentheses -Wvolatile-register-var -fdiagnostics-show-option    -c -o /Users/daryl/Code/bsl/build/Release/obj.target/bsl/groups/bsl/bslim/bslim_printer.o ../groups/bsl/bslim/bslim_printer.cpp

And the clang++ version is:

$ clang++ -v
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.1
Thread model: posix

bdl+inteldfp fails to build with clang in -std=c++11 mode

System: OS X Yosemite w/ latest Xcode

$ clang -v
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

A number of errors are reported, all similar to this:

In file included from ../groups/bdl/bdl+inteldfp/library_float128_dpml_ux_erf.cpp:37:
In file included from ./bde/groups/bdl/bdl+inteldfp/LIBRARY/float128/dpml_ux_erf.c:34:
./bde/groups/bdl/bdl+inteldfp/LIBRARY/float128/dpml_erf_x.h:47:17: 
error: constant expression evaluates to -131072 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing]
        /* 048 */ POS, -131072, DATA_2x2( 0x00000000, 0x00000000, 0x00000000, 0x00000000 ),
                       ^~~~~~~
In file included from ../groups/bdl/bdl+inteldfp/library_float128_dpml_ux_exp.cpp:37:
In file included from ./bde/groups/bdl/bdl+inteldfp/LIBRARY/float128/dpml_ux_exp.c:34:
./bde/groups/bdl/bdl+inteldfp/LIBRARY/float128/dpml_exp_x.h:64:17: 
error: constant expression evaluates to -66 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing]
        /* 088 */ NEG, 0-66, DATA_2x2( 0xf0342542, 0xd871319f, 0x359d2749, 0xfc32f366 ),
                       ^~~~
./bde/groups/bdl/bdl+inteldfp/LIBRARY/float128/dpml_exp_x.h:64:17: 
note: override this message by inserting an explicit cast
        /* 088 */ NEG, 0-66, DATA_2x2( 0xf0342542, 0xd871319f, 0x359d2749, 0xfc32f366 ),
                       ^~~~
                       static_cast<unsigned int>( )
./bde/groups/bdl/bdl+inteldfp/LIBRARY/float128/dpml_exp_x.h:103:22: 
error: constant expression evaluates to -1 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing]
        /* 536 */ DATA_1x2( 0x000000-1, 0x00000000 ),
                            ^~~~~~~~~~

Several test drivers are using 'deprecated or antiquated headers'

Test drivers of several components are using a strstream which generates this warning with gcc-4.9.2 on linux:

/usr/include/c++/4.9.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]

The list of affected test drivers are:

bdlt_datetime
bdlt_dayofweekset
bdlt_time
bslma_testallocator
bsls_types
bslstl_stringref
bslx_byteinstream
bslx_byteoutstream
bslx_testinstream
bslx_testoutstream
bslx_typecode

It's not clear to me if this is expected/by design, or an oversight.

bsl.txt

The following conflict still remains in bde / groups / bsl / doc / bsl.txt

<<<<<<< HEAD
The 'bsl' package group currently has 12 packages having 11 levels of physical
dependency.  The list below shows the hierarchical ordering of the packages.
The order of packages within each level is not architecturally significant,
just alphabetical.
=======
The 'bsl' package group currently has 13 packages having 12 levels of physical
dependency.  The list below shows the hierarchical ordering of the packages.
The order of packages within each level is not architecturally significant,
just alphabetical.

Note that required source control package 'bslscm' depends on 'bsls'; this
behavior is unique to 'bsl', although it is temporarily also in 'bde' for
historic reasons, since logically *every* other package should depend on
'bslscm'.
>>>>>>> workflow/internalcheckin/oss-import

Statically links CRT in MSVC

When building via Microsoft Visual Studio in static-library mode, the output is statically linked (/MT) against the C runtime. Unfortunately this conflicts with things that are build to dynamically link against the CRT (/MD), which is possibly/probably the majority of MSVC since (a) that's the default, and (b) that seems to be the general guidance.

That said, this might be not the case when building the BDE libraries with "--library-type shared", but please see the separate issue that "shared" is not currently working in MSVS2013.

bsl_unordered_map.h unconditionally includes <unordered_map>

Recording internal ticket D36473695, originally opened by Mike Verschell:

"I strongly suspect this will not compile on platforms without unordered_map as part of their standard library (e.g., Solaris), unless one is compiling with the BSL_OVERRIDES_STD flag turned on."

Build failure on SUSE Linux Enterprise Server due to unusual libstdc++ path

On SUSE 11/12 (and openSUSE 11/22), the C++ Standard Library is installed in /usr/include/c++ as it is on other Linux distributions. However, unlike other distributions, SLES does not provide a .. symbolic link. As an example, on SLES 11, with the 4.5.1 C++ standard library, the headers are installed in /usr/include/c++/4.5. On all other tested Linux distributions, there is also a symbolic link from /usr/include/c++/4.5.1 to /usr/include/c++/4.5.

The BSL standard headers include mechanism assumes that this three-component directory will exist, and as a result BSL will not build on SLES. A simple workaround is to create this symbolic link manually.

bsl::shared_ptr constructor documentation is incorrect

The following is incorrect:

template <class COMPATIBLE_TYPE>
explicit shared_ptr(COMPATIBLE_TYPE *ptr);
    // ... If 'ptr' is 0, an
    // empty shared pointer is created and no memory is allocated. ...

The code neither has an explicit check for 0, nor does the standard permit it. From 20.9.2.2.1:

template<class Y> explicit shared_ptr(Y* p);

3 Requires: p shall be convertible to T*. Y shall be a complete type. The expression delete p shall be well formed, shall have well defined behavior, and shall not throw exceptions.

4 Effects: Constructs a shared_ptr object that owns the pointer p.

5 Postconditions: use_count() == 1 && get() == p.

6 Throws: bad_alloc, or an implementation-defined exception when a resource other than memory
could not be obtained.

7 Exception safety: If an exception is thrown, delete p is called.

This can be seen with the following code:

int *p = 0;
bsl::shared_ptr<int> sp(p);
bsl::cout << sp.use_count() << bsl::endl;  // 1

However, the following code does print 0:

bsl::shared_ptr<int> sp(0);
bsl::cout << sp.use_count() << bsl::endl;  // 0

That's because this actually matches the following constructor:

shared_ptr(bsl::nullptr_t);                                     // IMPLICIT

I suggest removing the sentence:

If 'ptr' is 0, an empty shared pointer is created and no memory is allocated.

or perhaps replacing it with a sentence about a literal 0 matching the nullptr_t constructor. Note that there are a few constructors which say this, not just the one highlighted here.

bsls_atomic.t test case 7 times out (marked failure) on OS X

Machine: Fully patched OS X Yosemite

Darwin x.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

Compiler: Xcode 6

$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

When building in default x64 mode on OS X, all test drivers run successfully except for bsls_atomic.t case 7 -- it is cancelled by the test runner for timing out. Running the test manually in lldb shows that it is continuously looping performing atomic operations.

I have also tried both with the current code (it selects bsls_atomicoperations_x64_all_gcc.h due to the code thinking Clang is GCC 4.4.0) as well as the newer GCC >= 4.7 intrinsics selected when my patch #142 is applied (bsls_atomicoperations_all_all_gccintrinsics.h).

Printing out a stack walkback shows that the 2nd and 3rd thread are continuously changing calls, indicating they are not deadlocked, while the 1st thread is stopped in __semwait_signal:

Process 41142 stopped
* thread #1: tid = 0x235312, 0x00007fff858ef486 libsystem_kernel.dylib`__semwait_signal + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x235343, 0x000000010000cea3 bsls_atomic.t`(anonymous namespace)::PetersonsLockSeqCst<BloombergLP::bsls::AtomicInt>::lock(this=0x00007fff5fbfcc00) + 19 at bsls_atomic.t.cpp:258
  thread #3: tid = 0x235344, 0x000000010000d79c bsls_atomic.t`BloombergLP::bsls::AtomicInt::operator=(this=0x00007fff5fbfcc14, value=1) + 12 at bsls_atomic.h:1070
Process 54802 stopped
* thread #1: tid = 0x25d8c3, 0x00007fff858ef486 libsystem_kernel.dylib`__semwait_signal + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x25d8e3, 0x000000010000cf5e bsls_atomic.t`(anonymous namespace)::PetersonsLockSeqCst<BloombergLP::bsls::AtomicInt>::lock() + 206
  thread #3: tid = 0x25d8e4, 0x000000010000cf64 bsls_atomic.t`(anonymous namespace)::PetersonsLockSeqCst<BloombergLP::bsls::AtomicInt>::lock() + 212

std::unordered_map compilation problem

Hello,

I am working with bde library and I was getting some compilation errors when I included std::unordered_map:

..../bdeExample1.cpp:24:9: error: ‘unordered_map’ in namespace ‘std’ does not name a type

I have found this code in BDE_BUILD_PATH/include/bsl/unordered_map:

if 0 // Native STL header disabled until we routinely test for C++11 libs

if defined(BSLS_COMPILERFEATURES_SUPPORT_INCLUDE_NEXT)

include_next <unordered_map>

else

include BSL_NATIVE_CPP_LIB_HEADER(unordered_map)

endif

endif

I commented the #if 0/#endif statement and it seems to work fine. Is there any bde library version with this issue fixed? or how could I perform the tests needed to make sure things are working properly?

links broken on BDE-Allocator-model wiki page

There seem to be many wiki links with "bdl/blob" which stood instead be "bde/blob".

For example, the "BufferedSequentialAllocator" link in section BDL-Provided bdlma::ManagedAllocator Derived Classes links to:

https://github.com/bloomberg/bdl/blob/master/groups/bdl/bdlma/bdlma_bufferedsequentialallocator.h#L210

This link leads to a 404 "Page not found".

It should instead link to:

https://github.com/bloomberg/bde/blob/master/groups/bdl/bdlma/bdlma_bufferedsequentialallocator.h#L210

If you'd like, you can give me privileges to edit the page and I'll fix it myself. (I used to work at Bloomberg if that qualification helps).

Shared library fails to build with VS2013

The static variant builds just fine for me. But when I build as a DLL the final linking fails:

waf build
...
Waf: Leaving directory `C:\Users\Chris\Source\bde\build'
Build failed
-> missing file: 'C:\\Users\\Chris\\Source\\bde\\build\\groups\\bsl\\bsls\\bsls.lib'
-> missing file: 'C:\\Users\\Chris\\Source\\bde\\build\\groups\\bsl\\bsl.lib'

Here's the output of my configuration:

waf configure --library-type=shared
Using python
Setting top to                           : C:\Users\Chris\Source\bde
Setting out to                           : C:\Users\Chris\Source\bde\build
Checking for 'msvc' (c compiler)         : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\CL.exe
Checking for 'msvc' (c++ compiler)       : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\CL.exe
os_type                                  : windows
os_name                                  : windows_nt
cpu_type                                 : x86
os_ver                                   : 6.2
comp_type                                : cl
comp_ver                                 : 18.00
uplid                                    : windows-windows_nt-x86-6.2-cl-18.00
ufid                                     : dbg_exc_mt_shr
prefix                                   : C:\users\chris\appdata\local\temp
Loading BDE metadata                     : ok
Evaluating options for 'bsl'             : ok
Evaluating options for 'bdl'             : ok
Saving configuration                     : ok
'configure' finished successfully (4.022s)

bslstl_vector test case #18 failure on Mac OS X 10.7.5

When running the test suite (via 'make all') on Mac OS X 10.7.5 (Lion), I get a failure in bslstl_vector test case 18. Output below.

..../bsl/build/Release/obj.target/bslstl_tests_run/geni/bslstl_vector.t.ran
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 1
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 2
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 3
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 4
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 5
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 6
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 7
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 8
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 9
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 10
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 11
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 12
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 13
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 14
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 15
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 16
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 17
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 18
*** Memory corrupted at 1 bytes after 80 byte segment at 0x101b009d0. ***
Pad area after user segment:
0x101b00a20:    5f b1 b1 b1   b1 b1 b1 b1   b1 b1 b1 b1   b1 b1 b1 b1
Header:
0x101b00990:    ef be ad de   00 00 00 80   50 00 00 00   00 00 00 00
0x101b009a0:    4b 00 00 00   00 00 00 00   60 09 b0 01   01 00 00 00
0x101b009b0:    90 cd 4d 61   ff 7f 00 00   00 00 00 00   00 00 00 80
0x101b009c0:    b1 b1 b1 b1   b1 b1 b1 b1   b1 b1 b1 b1   b1 b1 b1 b1
User segment:
0x101b009d0:    5f a5 a5 a5   a5 a5 a5 a5   a5 a5 a5 a5   a5 a5 a5 a5
0x101b009e0:    5f b1 b1 b1   b1 b1 b1 b1   b1 b1 b1 b1   b1 b1 06 00
0x101b009f0:    5f f0 ad de   00 00 00 80   20 00 00 00   00 00 00 00
0x101b00a00:    5f 00 00 00   00 00 00 00   70 08 b0 01   01 00 00 00
Abnormal test failure: -6
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 19
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 20
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 21
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 22
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 23
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 24
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 25
make: ***
[.../bsl/build/Release/obj.target/bslstl_tests_run/geni/bslstl_vector.t.ran]
Error 1

% gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure
--disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

OS X build - bsls_timeutil

There's a couple of errors in the OSX build (with makefiles rather than xcode). This

alaric@zeus:~/projects/bsl/build$ make
CXX(target) /Users/alaric/projects/bsl/build/Release/obj.target/bsl/groups/bsl/bsls/bsls_timeutil.o
../groups/bsl/bsls/bsls_timeutil.cpp: In static member function ‘static void BloombergLP::<unnamed>::UnixTimerUtil::systemProcessTimers(clock_t*, clock_t*)’:
../groups/bsl/bsls/bsls_timeutil.cpp:77: warning: comparison between signed and unsigned integer expressions
../groups/bsl/bsls/bsls_timeutil.cpp: In static member function ‘static void BloombergLP::bsls::TimeUtil::getTimerRaw(timeval*)’:
../groups/bsl/bsls/bsls_timeutil.cpp:621: error: ‘gettimeofday’ was not declared in this scope
make: *** [/Users/alaric/projects/bsl/build/Release/obj.target/bsl/groups/bsl/bsls/bsls_timeutil.o] Error 1
alaric@zeus:~/projects/bsl/build$ 

gettimeofday() is used in the 'generic' UNIX (non Solaris/AIX/HPUX/Linux) section of getTimerRaw, but sys/time.h is only included for solaris and hpux platform defines.

The warning appears to be correct usage (checking for times() returning -1), but clock_t is unsigned long in the darwin headers so should be comparing ((clock_t)-1) or equivalent.

Various 'signedchar is not defined' errors building with Solaris Studio 12.3 on Solaris 11.1

The following test drivers produce a series of "signedchar is not defined" errors.

  • bstlstl_bidirectionalnodepool.t.cpp
  • bslstl_hashtable.t.cpp
  • bslstl_hashtablebucketiterator.t.cpp
  • bslstl_hashtableiterator.t.cpp
  • bslstl_map.t.cpp
  • bslstl_mapcomparator.t.cpp
  • bslstl_multimap.t.cpp
  • bslstl_multiset.t.cpp
  • bslstl_priorityqueue.t.cpp
  • bslstl_queue.t.cpp
  • bslstl_set.t.cpp
  • bslstl_setcomparator.t.cpp
  • bslstl_stack.t.cpp
  • bslstl_unorderedmap.t.cpp
  • bslstl_unorderedmultimap.t.cpp
  • bslstl_unorderedmultiset.t.cpp
  • bslstl_unorderedset.t.cpp
  • bsltf_templatetestfacility.t.cpp

bsls_stopwatch.t cases 3 and 4 appear to hang on Fedora 17

This has been seen on both 32-bit and 64-systems, running in VirtualBox VMs (many other Linux distributions do not exhibit this problem in the same VirtualBox installation). Running the tests with a timeout of 30 seconds causes the timeout to fire reliably.

bde/samples/object_pool example is broken

objectpool.h in samples can't possibly compile due to attempted use of operator[] on an instance of bsl::list<TYPE *> in Enterprise::pkg::ObjectPool::~ObjectPool()

Missing link in Wiki -> Getting Started page

In Getting Started -> Build Configurations and Options section there is a missing link to the details on the Safe mode build configuration.

Text currently reads:

"See [this] page for more details on Safe mode." with no link.

bslstl_vector case 17 fails on Mac OSX/optimized build

Debug mode builds do not fail. 32-bit and 64-bit builds fail. Builds were performed using the latest Xcode version.

The failure produces this output in verbose mode:

        Emplace with exceptions.
                With initial value of INIT_LENGTH = 0, INIT_CAP = 0, using default value.
                BSLMA EXCEPTION TEST -- (ENABLED) --
libc++abi.dylib: terminate called throwing an exception

Cannot obtain pointer to member to bsl::pair<>

The following line fails to compile:

int bsl::pair<int,int>::* p = &bsl::pair<int,int>::first;

The problem is the use of private inheritance from 'bsl::Pair_Imp<>', as the type of the right hand side expression '&bsl::pair<int,int>` is ' int bsl::Pair_Imp<int,int,0,0>::*' and the conversion from pointer to member of type 'bsl::Pair_Imp<>' is blocked by the access specifier.

bdldfp_decimal.t.exe Failures : Windows 7 x64

Running the tests on a window7 x64 machine the following tests fail.

I have not looked into it yet, but interesting to note that it is assuming a x86 setup

TEST e:\bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp CASE 5
LINE: 461 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 462 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 463 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 464 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 465 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 466 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 467 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 468 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 469 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 470 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 471 ACTUAL: nan EXPECTED: infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 472 ACTUAL: NAN EXPECTED: INFINITY
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 474 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 475 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 476 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 477 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 478 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 479 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 480 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 481 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 482 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 483 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 484 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 485 ACTUAL: NAN EXPECTED: -INFINITY
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 488 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 489 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 490 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 491 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 492 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 493 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 494 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 495 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 496 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 497 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 498 ACTUAL: nan EXPECTED: - infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 500 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 501 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 502 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 503 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 504 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 505 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 506 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 507 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 508 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 509 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
LINE: 510 ACTUAL: nan EXPECTED: -infinity
Error e - \bde\bde-master\groups\bdl\bdldfp\bdldfp_decimal.t.cpp(595): ACTUAL == EXPECTED (failed)
Error, non-zero test status = 46.

The cut down version of the Waf Config.log is as follows ( Sadly I cant attach a log file )

project configured on Mon Sep 08 11:48:52 2014 by

waf 1.7.15 (abi 98, python 20708f0 on win32)

using E:\BDE\bde-tools-master\bin\waf configure


Setting top to

E:\BDE\bde-master

Setting out to

E:\BDE\bde-master\build

Checking for 'msvc' (c compiler)
['cmd', '/E:on', '/V:on', '/C', 'E:\BDE\bde-master\build\waf-print-msvc.bat']
out: Setting environment for using Microsoft Visual Studio 2008 x86 tools.

-- LOTS REMOVED FOR BREVITY --
-- shout if you need this information --


os_type

windows

os_name

windows_nt

cpu_type

x86

os_ver

6.1

comp_type

cl

comp_ver

18.00

uplid

windows-windows_nt-x86-6.1-cl-18.00

ufid

dbg_exc_mt

prefix

C:\users\stephenb\appdata\local\temp

Loading BDE metadata

ok

Evaluating options for 'bsl'

ok

Evaluating options for 'bdl'

ok

Saving configuration
ok

64-bit debian build failure (tool selection broken)

64-Ubuntu build failure. I had earlier problems detailed in issue #116 but they went away when I merged @kpfleming 's patch. Anyway tool selection is broken for me again - it's blocking, can't get a build.

fletch@curry:~/project/bde/shayne$ uname -a
Linux curry 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux

Output from waf configure

Setting top to                           : /home/fletch/project/bde/varun/bde 
Setting out to                           : /home/fletch/project/bde/varun/bde/build 
Checking for 'gcc' (c compiler)          : /usr/bin/gcc 
Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 
os_type                                  : unix 
os_name                                  : linux 
cpu_type                                 : x86_64 
os_ver                                   : 3.2.0 
comp_type                                : gcc 
comp_ver                                 : 4.7.2 
uplid                                    : unix-linux-x86_64-3.2.0-gcc-4.7.2 
ufid                                     : dbg_exc_mt 
prefix                                   : /usr/local/ 
Loading BDE metadata                     : ok 
Evaluating options for 'bsl'             : 19:31:33 runner 'uname -r'
ok 
Evaluating options for 'bdl'             : ok 
Saving configuration                     : ok 
'configure' finished successfully (0.069s)

Output from waf build:

Waf: Entering directory `/home/fletch/project/bde/varun/bde/build'
Waf: using 1 jobs (change with -j)
[  1/299] cxx: groups/bsl/bsltf/bsltf_allocbitwisemoveabletesttype.cpp -> build/groups/bsl/bsltf/bsltf_allocbitwisemoveabletesttype.cpp.1.o
[bsltf_allocbitwisemoveabletesttype.cpp (ERROR)] <<<<<<<<<<
In file included from /usr/include/features.h:388:0,
                 from /usr/include/endian.h:22,
                 from /home/fletch/project/bde/varun/bde/groups/bsl/bsls/bsls_platform.h:703,
                 from /home/fletch/project/bde/varun/bde/groups/bsl/bsls/bsls_linkcoercion.h:54,
                 from /home/fletch/project/bde/varun/bde/groups/bsl/bsls/bsls_buildtarget.h:31,
                 from /home/fletch/project/bde/varun/bde/groups/bsl/bslscm/bslscm_version.h:40,
                 from /home/fletch/project/bde/varun/bde/groups/bsl/bsltf/bsltf_allocbitwisemoveabletesttype.h:75,
                 from ../groups/bsl/bsltf/bsltf_allocbitwisemoveabletesttype.cpp:2:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
>>>>>>>>>>
Waf: Leaving directory `/home/fletch/project/bde/varun/bde/build'
Build failed
 -> task in 'bsltf_lib' failed (exit status 1): 
    {task 22958992: cxx bsltf_allocbitwisemoveabletesttype.cpp -> bsltf_allocbitwisemoveabletesttype.cpp.1.o}
['/usr/bin/g++', '-Wcast-align', '-Wcast-qual', '-Wall', '-Wextra', '-Wformat-security', '-Wformat-y2k', '-Winit-self', '-Wno-long-long', '-Wno-unknown-pragmas', '-Wpacked', '-Wpointer-arith', '-Wwrite-strings', '-Wno-unused-value', '-Wno-char-subscripts', '-Wsign-compare', '-Wparentheses', '-Wlogical-op', '-Wstrict-overflow', '-Wvla', '-Wvolatile-register-var', '-fdiagnostics-show-option', '-Wno-sign-conversion', '-Wconversion', '-Waddress', '-Wtype-limits', '-Wcast-align', '-Wsign-compare', '-Wformat', '-Woverflow', '-Wlarger-than-100000', '-Werror=cast-qual', '-m32', '-march=pentium2', '-mtune=opteron', '-DBDE_BUILD_TARGET_DBG', '-DBDE_BUILD_TARGET_EXC', '-DBDE_BUILD_TARGET_MT', '-pipe', '-fexceptions', '-g', '-D_POSIX_PTHREAD_SEMANTICS', '-D_REENTRANT', '-DBSLS_IDENT_OFF', '-DBSL_OVERRIDES_STD', '-I/home/fletch/project/bde/varun/bde/groups/bsl/bsltf', '-I/home/fletch/project/bde/varun/bde/groups/bsl/bslalg', '-I/home/fletch/project/bde/varun/bde/groups/bsl/bslma', '-I/home/fletch/project/bde/varun/bde/groups/bsl/bslmf', '-I/home/fletch/project/bde/varun/bde/groups/bsl/bslscm', '-I/home/fletch/project/bde/varun/bde/groups/bsl/bsls', '../groups/bsl/bsltf/bsltf_allocbitwisemoveabletesttype.cpp', '-c', '-o', 'groups/bsl/bsltf/bsltf_allocbitwisemoveabletesttype.cpp.1.o']

BDE markup language

Is there a package available somewhere (bdeml?) that can be used to generate the doxygen documentation?

bsls_atomic.t case 6 fails on RedHat Enterprise Linux 5.8 32-bit systems

I have setup brand-new RHEL 5.8 systems on Amazon EC2 instances to use for BSL builds and testing. On the 32-bit systems, this test case fails repeatably with the following log output:

TEST ../groups/bsl/bsls/bsls_atomic.t.cpp CASE 6
i: 0
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1319): EXP == result    (failed)
i: 0
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1320): EXP == X    (failed)
i: 1
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1319): EXP == result    (failed)
i: 1
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1320): EXP == X    (failed)
i: 2
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1319): EXP == result    (failed)
i: 2
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1320): EXP == X    (failed)
i: 3
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1319): EXP == result    (failed)
i: 3
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1320): EXP == X    (failed)
i: 4
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1319): EXP == result    (failed)
i: 4
Error ../groups/Abnormal test failure: 20
bsl/bsls/bsls_atomic.t.cpp(1320): EXP == X    (failed)
i: 0
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1339): VAL == result    (failed)
i: 0
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1340): EXP == X    (failed)
i: 1
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1339): VAL == result    (failed)
i: 1
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1340): EXP == X    (failed)
i: 2
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1339): VAL == result    (failed)
i: 2
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1340): EXP == X    (failed)
i: 3
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1339): VAL == result    (failed)
i: 3
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1340): EXP == X    (failed)
i: 4
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1339): VAL == result    (failed)
i: 4
Error ../groups/bsl/bsls/bsls_atomic.t.cpp(1340): EXP == X    (failed)
Error, non-zero test status = 20.

The full build/test log can be found here:
http://ci.openbloomberg.com/jenkins/job/BSL/Architecture=x86-32,BuildType=Debug,Platform=RedHat-5/15/console

32-bit builds with Xcode 5.1 on OSX 10.8 fail due to bslstl_hashtable.t size

Build succeeds in 64-bit mode. It may also fail on OSX 10.9, but cannot confirm at this time due to other issues that cause OSX 10.9 builds to fail (already reported).

Error message is:
fatal error: error in backend: Section too large, can't encode r_address (0x100000b) into 24 bits of scattered relocation entry.

Question : MemoryAllocators : buffer sizes are int not size_t

I have noticed that when looking around the allocators, arguments regarding buffer sizes are of type int. Would it not be more portable and in some cases more efficient to use size_t types.

BufferedSequentialAllocator(
                          char                        *buffer,
                          int                          size,
                          bslma::Allocator            *basicAllocator = 0);

This would also have the benefit of allowing more memory capacity when the sign of the int artificially limits the size of the memory available, whereas size_t is unsigned.

Looking around the I see that bslma::Allocator defines a size_type

public:
// PUBLIC TYPES
typedef bsls::Types::size_type size_type;
    // Alias for a signed integral type capable of representing the number
    // of bytes in this platform's virtual address space.

Which is defined as size_t

// TYPES
typedef std::size_t size_type;
    // The alias 'size_type' refers to the preferred type for denoting a
    // number of elements in either 'bslma' allocators or container types.

Should the allocators not use size_type then whenever dealing with buffer sizes in their apis ?

bslalg_hashtableimputil.t.cpp build failure Solaris Studio 12.3 on Solaris 11.1

At the moment I cannot provide remote access to the build system, but here's the compiler output:

  CXX(target) /root/bsl/build/Release/obj.target/bslalg_hashtableimputil.t/groups/bsl/bslalg/bslalg_hashtableimputil.t.o
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: "," expected instead of ">>".
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Illegal value for template parameter.
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Unexpected ")" -- Check for matching parenthesis.
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: "," expected instead of ")".
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Unexpected ")" -- Check for matching parenthesis.
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Operand expected instead of ")".
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: "," expected instead of ">>".
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Illegal value for template parameter.
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Unexpected ")" -- Check for matching parenthesis.
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: "," expected instead of ")".
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Unexpected ")" -- Check for matching parenthesis.
"../groups/bsl/bslalg/bslalg_hashtableimputil.t.cpp", line 1330: Error: Operand expected instead of ")".
12 Error(s) detected.

Bad Format Specifier in printf for bslstl_hashtable.t.cpp

I'm running waf build --test build on darwin and encounter the following error on 32bit:

$ waf build --test build
Waf: using 4 jobs (change with -j)
[351/880] cxx: groups/bsl/bslstl/bslstl_hashtable.t.cpp -> build/groups/bsl/bslstl/bslstl_hashtable.t.cpp.152.o
[bslstl_hashtable.t.cpp (ERROR)] <<<<<<<<<<
../groups/bsl/bslstl/bslstl_hashtable.t.cpp:1662:62: warning: format specifies type 'long' but the argument has type 'bsl::iterator_traits<MySalesRecordContainer::ConstItrById>::difference_type' (aka 'int') [-Wformat]
            printf("customerId %d, count %ld\n", customerId, count);
                                         ~~~                 ^~~~~
                                         %d
../groups/bsl/bslstl/bslstl_hashtable.t.cpp:1705:58: warning: format specifies type 'long' but the argument has type 'bsl::iterator_traits<MySalesRecordContainer::ConstItrById>::difference_type' (aka 'int') [-Wformat]
            printf("vendorId %d, count %ld\n", vendorId, count);
                                       ~~~               ^~~~~
                                       %d

Suspect switching %ld to %d fixes the issue on 32bit.

bdldfp_decimalimputil_inteldfp.t.cpp missing include

When building bdldfp_decimalimputil_inteldfp.t.cpp, I get the following error:

[bdldfp_decimalimputil_inteldfp.t.cpp (ERROR)] <<<<<<<<<<
../groups/bdl/bdldfp/bdldfp_decimalimputil_inteldfp.t.cpp:34:7: error: no member named 'atoi' in namespace 'bsl'; did you mean '::atoi'?
using bsl::atoi;
      ^~~~~~~~~
      ::atoi
/usr/include/stdlib.h:132:6: note: '::atoi' declared here
int      atoi(const char *);
         ^
1 error generated.
>>>>>>>>>>

gcc crashes while compiling bslstl_hashtable.t.cpp

Complete build of bsl fails with
../groups/bsl/bslstl/bslstl_hashtable.t.cpp:11150:1: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.7/README.Bugs for instructions.

gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)

Building on Ubuntu 13.04

Didn't have another ubuntu vm at hand so I had to do the following to make building work:

diff --git a/common.gypi b/common.gypi
index 2047abc..de79dcc 100644
--- a/common.gypi
+++ b/common.gypi@@ -42,7 +42,7 @@            
 'cflags_base%': [ '-pipe', # uncomment -std= to specify compiler std
                              #'-std=c++0x', # gcc 4.6
                              #'-std=c++11', # gcc 4.7
-                              '-pthread', ],       # thread aware (not optional)
+                              '-pthread', '-include sys/types.h'],       # thread aware (not optional)
             'cflags_opt%': [ '-O2', '-fno-strict-aliasing', ],
             'cflags_c_debug%':  [ '-g -fno-inline' ],
             'cflags_cc_debug%': [ '-g -fno-inline' ],

Otherwise i'd see a lot of undefined type __off_t and similar errors when compiling.

Infer -Dunix on Darwin

bsls_platform is able to infer BSLS_PLATFORM_OS_UNIX for Darwin, but still requires one of unix, __unix or __unix__ to be defined. This does not apply for any of the other *nixes.

The check is done in the following snippet from bsls_platform;

// Unix flag must be set by the compiler if Unix detected (except for AIX).
#if defined(BSLS_PLATFORM_OS_UNIX) && !defined(BSLS_PLATFORM_OS_AIX)
    #if !defined(unix) && !defined(__unix__) && !defined(__unix)
        #error "Unix platform assumed, but unix flag not set by compiler"
        BSLS_PLATFORM_COMPILER_ERROR;
    #endif
#endif

However, the issue arises from the fact that g++ and clang++ both define __GNUC__ but never lead to the definition of BSLS_PLATFORM_OS_WINDOWS. As a result, we define BSLS_PLATFORM_OS_UNIX and so we expect one of unix, __unix or __unix__ to be defined during the validation stage.

OS X (and Darwin) should not require any special definitions if it is to be a supported platform.

Incidentally, xlC also does not define unix, __unix nor __unix__, but it is explicitly excluded in the validation step.

Broken link in 'BDE-Allocator-model.md'

In the sentence
An example of this is provided by showing the creators of a Customer) class that stores the first and last names of a customer ...
The word "Customer" is highlighted as a link; however, it does not show anything.
Also, the sentence has an unbalanced right parenthesis.

[Windows] Waf error when configuring bde with MinGW

Hello everyone.
I have tried configuring BDE with MinGW on Windows 7 32bit.
I use Qt Creator 3.3.2 and its MinGW version 4.9.1

Whenever I use the command 'waf configure --check-c-compiler=gcc and --check-cxx-compiler=g++', (I also tried to modify bde-tools\bin\lib\bdebld\waf\wscript.py - removed 'msvc' and replaced it by 'gcc' and 'g++')

I get the following error:
Command['C:\Qt\Tools\mingw491_32\bin\g++.exe'] returned 1

I looked up the error on the log and the error is said to come from the fact that there are 'no input files'.
I don't know if it comes from MinGW's g++.exe or if BDE does not support it on Windows.

here is the log (I removed the beginning):

Checking for 'gcc' (C compiler)
find program=['gcc', 'cc'] paths=['C:\Programs\Python-2.7.9\ ', 'C:\Programs\Python-2.7.9\ Scripts', 'C:\Programs\Python-2.7.9\ Tools\Scripts', 'C:\Programs\Python-2.7.9', 'C:\Qt\Tools\mingw491_32\bin', 'C:\Programs\Python-2.7.9\Scripts', 'C:\ProgramData\Oracle\Java\javapath', 'C:\Program Files\NVIDIA Corporation\PhysX\Common', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\libnvvp', 'C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0', ' C:\Programs\Git\cmd', 'C:\Program Files\Windows Kits\8.1\Windows Performance Toolkit', 'C:\Program Files\Microsoft SQL Server\110\Tools\Binn', 'C:\Program Files\Microsoft SDKs\TypeScript\1.0', 'C:\Programs\TortoiseHg', 'C:\Program Files\CMake\bin', 'C:\Programs\bde-tools\bin'] var='CC' -> ['C:\Qt\Tools\mingw491_32\bin\gcc.exe']
find program=['ar'] paths=['C:\Programs\Python-2.7.9\ ', 'C:\Programs\Python-2.7.9\ Scripts', 'C:\Programs\Python-2.7.9\ Tools\Scripts', 'C:\Programs\Python-2.7.9', 'C:\Qt\Tools\mingw491_32\bin', 'C:\Programs\Python-2.7.9\Scripts', 'C:\ProgramData\Oracle\Java\javapath', 'C:\Program Files\NVIDIA Corporation\PhysX\Common', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\libnvvp', 'C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0', ' C:\Programs\Git\cmd', 'C:\Program Files\Windows Kits\8.1\Windows Performance Toolkit', 'C:\Program Files\Microsoft SQL Server\110\Tools\Binn', 'C:\Program Files\Microsoft SDKs\TypeScript\1.0', 'C:\Programs\TortoiseHg', 'C:\Program Files\CMake\bin', 'C:\Programs\bde-tools\bin'] var='AR' -> ['C:\Qt\Tools\mingw491_32\bin\ar.exe']
C:\Qt\Tools\mingw491_32\bin\gcc.exe

Checking for 'g++' (C++ compiler)
find program=['g++', 'c++'] paths=['C:\Programs\Python-2.7.9\ ', 'C:\Programs\Python-2.7.9\ Scripts', 'C:\Programs\Python-2.7.9\ Tools\Scripts', 'C:\Programs\Python-2.7.9', 'C:\Qt\Tools\mingw491_32\bin', 'C:\Programs\Python-2.7.9\Scripts', 'C:\ProgramData\Oracle\Java\javapath', 'C:\Program Files\NVIDIA Corporation\PhysX\Common', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\libnvvp', 'C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0', ' C:\Programs\Git\cmd', 'C:\Program Files\Windows Kits\8.1\Windows Performance Toolkit', 'C:\Program Files\Microsoft SQL Server\110\Tools\Binn', 'C:\Program Files\Microsoft SDKs\TypeScript\1.0', 'C:\Programs\TortoiseHg', 'C:\Program Files\CMake\bin', 'C:\Programs\bde-tools\bin'] var='CXX' -> ['C:\Qt\Tools\mingw491_32\bin\g++.exe'](tool ar is already loaded, skipping)
C:\Qt\Tools\mingw491_32\bin\g++.exe
['C:\Qt\Tools\mingw491_32\bin\g++.exe']
err: g++.exe: fatal error: no input files

compilation terminated.

Issues with generated documentation

Looking at the generated docs the page documenting the bsls package does not contain bsls_platformutil in the list of components or component's synopsis, but it is listed in the Detailed description and Component Overview sections. The latter contains a broken link.

need custom complier define flag to compile

I am on OS X, using clang, try to build a hello_world program which using bsl library. The library itself built smoothly. But to build a program using bsl is not that straight forward. I get it done by adding '-D_REENTRANT' '-D_THREAD_SAFE' '-D__unix' '-DBDE_BUILD_TARGET_EXC' '-DBDE_BUILD_TARGET_MT' '-DBDE_BUILD_TARGET_OPT' '-DNDEBUG'
I guess some of them are optional. It would be nice to have document about this.

Question regarding running failed tests individually

I recently built and ran the bde + bsl suite on my Solaris system.

While my build was successful, I had a few runtime failures. I am a novice user and had a couple of questions.

My command line is
python waf build -j 1 --test=build --abi-bits=64

For example my log file shows:
TEST ../groups/bsl/bslstl/bslstl_vector.t.cpp CASE 2
li: 1
Error ../groups/bsl/bslstl/bslstl_vector.t.cpp(8422): B + 0 + TYPE_ALLOC == A (failed)
li: 2
Error ../groups/bsl/bslstl/bslstl_vector.t.cpp(8422): B + 0 + TYPE_ALLOC == A (failed)
li: 4

  1. While this runs all the tests, is there a way for me to just rerun the failed tests?
    I know I can run the binary as say
    $ groups/bsl/bslstl/bslstl_vector.t 2
    Can I do something like
    python waf ...

  2. Also, would it be possible to see the flags that were passed to the C++ compiler preferably while the test is running? I did try the verbose option but it didn't seem to help.

Thanks.

MyTestObjectFactory seems non sensical in bslstl_sharedptr.t.cpp

Could someone explain the purpose of:
https://github.com/bloomberg/bde/blob/master/groups/bsl/bslstl/bslstl_sharedptr.t.cpp#L1818

this generates a warning:

[bslstl_sharedptr.t.cpp (WARNING)] <<<<<<<<<< ../groups/bsl/bslstl/bslstl_sharedptr.t.cpp:1819:43: warning: field 'd_allocator_p' is uninitialized when used here [-Wuninitialized] : d_allocator_p(bslma::Default::allocator(d_allocator_p))

The code looks a little non sensical to me - not sure what's trying to achieve? Should the initialisation be replaced with
d_allocator_p(bslma::Default::allocator(0))?

MSVC 12: Error building tests with 64 bit ABI

On Visual C++ 2013 (msvc 12, cl 18) if ABI bits is set to 64, BDE itself builds but the tests fail to build with the following error:

[ 309/1076] cxxprogram: build\groups\bsl\bsls\bsls_alignedbuffer.t.cpp.159.o -> build\groups\bsl\bsls\bsls_alignedbuffer.t.exe build\groups\bsl\bsls\bsls_alignedbuffer.t.exe.manifest groups\bsl\bsls\bsls_alignedbuffer.t.cpp.159.o : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Any suggestion on how to resolve this would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.