From e46d23bd620467a34dacaf9fafde5e16a92394e1 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 17 Aug 2017 13:24:34 +0200 Subject: [PATCH] GCC-5 compatibility: need 1/3 more inline buffer space GCC-5 requires more storage for some basic data types Most notably std::string is now way larger than void* --- src/lib/opaque-holder.hpp | 5 ++++- tests/core/proc/asset/entry-id-test.cpp | 5 ++++- tests/library/diff/diff-complex-application-test.cpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/opaque-holder.hpp b/src/lib/opaque-holder.hpp index 6e1fe9689..4be97561c 100644 --- a/src/lib/opaque-holder.hpp +++ b/src/lib/opaque-holder.hpp @@ -75,6 +75,7 @@ #include #include #include +#include namespace lib { @@ -730,7 +731,9 @@ namespace lib { { if (sizeof(SUB) > maxSiz_) throw error::Fatal("Unable to implant implementation object of size " - "exceeding the pre-established storage buffer capacity." + "exceeding the pre-established storage buffer capacity. " + +boost::lexical_cast(sizeof(SUB)) + " > " + +boost::lexical_cast(maxSiz_) ,error::LUMIERA_ERROR_CAPACITY); using Holder = InPlaceBuffer; diff --git a/tests/core/proc/asset/entry-id-test.cpp b/tests/core/proc/asset/entry-id-test.cpp index 516253de8..3c0734c0f 100644 --- a/tests/core/proc/asset/entry-id-test.cpp +++ b/tests/core/proc/asset/entry-id-test.cpp @@ -175,8 +175,11 @@ namespace test{ cout << showSizeof() << endl; cout << showSizeof() << endl; + cout << showSizeof() << endl; + cout << showSizeof() << endl; + cout << showSizeof() << endl; CHECK (sizeof(ForkID) == sizeof(BareEntryID)); - CHECK (sizeof(ForkID) == sizeof(lumiera_uid) + sizeof(void*)); + CHECK (sizeof(ForkID) == sizeof(lumiera_uid) + sizeof(string)); } diff --git a/tests/library/diff/diff-complex-application-test.cpp b/tests/library/diff/diff-complex-application-test.cpp index aa5bdd033..f0c0f1f0f 100644 --- a/tests/library/diff/diff-complex-application-test.cpp +++ b/tests/library/diff/diff-complex-application-test.cpp @@ -272,7 +272,7 @@ namespace test{ friend constexpr size_t treeMutatorSize (const Opaque*) { - return 350; + return 430; } };