[Bug 1557852] Re: [needs-packaging] juju-mongodb3.2 in xenial, wily, and trusty
Michael Hudson-Doyle
michael.hudson+lp at canonical.com
Fri Apr 1 02:54:03 UTC 2016
Something very odd is going on with the problem offset-outside-of-
bounds.patch is addressing. I hacked the offending source file down to
http://paste.ubuntu.com/15573220/.
This fails to compile with -O2:
ubuntu at promonarchy-remi:~/xenial-mongodb-3.2$ g++ -o foo.o -c -O2 -Werror -std=c++11 -Ibuild/opt -Isrc src/mongo/bson/bson_obj_test.cpp
In file included from src/mongo/db/jsobj.h:49:0,
from src/mongo/bson/bson_obj_test.cpp:28:
src/mongo/bson/bsonelement.h: In member function ‘virtual void {anonymous}::UnitTest__BSONObj__getFields::_doTest()’:
src/mongo/bson/bsonelement.h:231:23: error: offset outside bounds of constant string [-Werror]
return data + 1;
^
cc1plus: all warnings being treated as errors
It succeeds with -O1 though. It _also_ succeeds with -O1 and all the
-fxxx flags that -O2 implies on top of -O1. It _also_ succeeds if almost
any line is removed from the file. But if you remove a few lines and
change it to -O3, it fails again. So I guess some threshold-based
optimization eventually transforms the code in the file into something
that triggers the warning. I'm not quite confident enough to call this a
compiler bug, but it's certainly user hostile.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to juju-mongodb in Ubuntu.
https://bugs.launchpad.net/bugs/1557852
Title:
[needs-packaging] juju-mongodb3.2 in xenial, wily, and trusty
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/juju-mongodb/+bug/1557852/+subscriptions
More information about the Ubuntu-server-bugs
mailing list