From c65f98fadce5b1de3722fcd2291f5c7f92e1555b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 28 Mar 2011 01:52:09 -0400 Subject: [PATCH 1/4] Use g++ 4.6 by default locally --- lib/Makefile | 2 +- tools/proof | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 10e63d5b..fa81bb76 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,7 +5,7 @@ STOW_ROOT = /usr/local/stow PRODUCTS = $(HOME)/Products -GCC_VERSION = 4.5 +GCC_VERSION = 4.6 BOOST_VERSION = 1_46_1 CC = gcc-mp-$(GCC_VERSION) diff --git a/tools/proof b/tools/proof index cd7b6636..0bd1e81f 100755 --- a/tools/proof +++ b/tools/proof @@ -14,7 +14,7 @@ fi rm -fr ~/Products/ledger-proof -time ./acprep --enable-doxygen --universal -j16 --warn proof 2>&1 | \ +time ./acprep --enable-doxygen --universal -j16 --gcc46 --warn proof 2>&1 | \ tee ~/Desktop/proof.log if egrep -q '(ERROR|CRITICAL)' ~/Desktop/proof.log; then From 6257e6b4babc6450618dd62e8880ba4fdde42698 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 28 Mar 2011 01:52:27 -0400 Subject: [PATCH 2/4] Remove spurious false errors when using GuardMalloc --- test/LedgerHarness.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py index 44e4e61c..48d038ba 100755 --- a/test/LedgerHarness.py +++ b/test/LedgerHarness.py @@ -96,7 +96,7 @@ class LedgerHarness: line == "GuardMalloc: - Some buffer overruns may not be noticed.\n" or \ line == "GuardMalloc: - Applications using vector instructions (e.g., SSE or Altivec) may fail.\n" or \ line == "GuardMalloc: - Applications expecting word-aligned pointers may fail (such as Carbon applications)\n" or \ - line == "GuardMalloc: GuardMalloc version 18\n": + line.startswith("GuardMalloc: GuardMalloc version"): continue else: lines.append(line) From 9f4307accda683453a8be0cbb81fd074ccc88991 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 28 Mar 2011 01:52:41 -0400 Subject: [PATCH 3/4] Fixed 'acprep dependencies' for Ubuntu Hardy and Natty --- acprep | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acprep b/acprep index 644e152d..fef5d002 100755 --- a/acprep +++ b/acprep @@ -236,7 +236,8 @@ class BoostInfo(object): 'libboost-python-dev', 'libboost-regex-dev', 'libboost-date-time-dev', - 'libboost-filesystem-dev' ] + 'libboost-filesystem-dev', + 'libboost-iostreams-dev' ] class CommandLineApp(object): "Base class for building command line applications." @@ -879,6 +880,7 @@ class PrepareBuild(CommandLineApp): 'libtool', 'autoconf', 'automake', + 'autopoint', 'zlib1g-dev', 'libbz2-dev', 'python-dev', From af94c94a6f927e66cacd71b4625f785372fa438d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 28 Mar 2011 01:53:15 -0400 Subject: [PATCH 4/4] Corrected a transient display order flaw This was harmless, but affected the testability of results. --- src/xact.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/xact.cc b/src/xact.cc index 35d61edd..1acbd0a4 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -325,9 +325,18 @@ bool xact_base_t::finalize() DEBUG("xact.finalize", "there was a null posting"); if (balance.is_balance()) { - bool first = true; const balance_t& bal(balance.as_balance()); + typedef std::map sorted_amounts_map; + sorted_amounts_map samp; foreach (const balance_t::amounts_map::value_type& pair, bal.amounts) { + std::pair result = + samp.insert(sorted_amounts_map::value_type(pair.first->mapping_key(), + pair.second)); + assert(result.second); + } + + bool first = true; + foreach (sorted_amounts_map::value_type& pair, samp) { if (first) { null_post->amount = pair.second.negated(); null_post->add_flags(POST_CALCULATED);