marylinh / seccompsandbox

Automatically exported from code.google.com/p/seccompsandbox
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Build error with GCC 4.5 #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When building with GCC 4.5, this error pops up:

sandbox.cc: In static member function ‘static void
playground::Sandbox::startSandbox()’:
sandbox.cc:447:24: error: ‘secureMem’ was not declared in this scope

In GCC 4.4 and earlier, and in the original C++ standard,

struct A { struct B {}; };

A::A::A::B::B::B::B::B myVariable;

is a perfectly valid declaration of a variable of type A::B.

In GCC 4.5, and in the current C++ standard, A::A is A's constructor, not
the type A. Normally, this won't be a problem, but in this case macro use
allowed it to creep in. Attached very trivial patch (based on the chromium
sources, but applicable without changes) modifies this so that it compiles.

This patch should be completely harmless for other compilers, but I can't
actually test for any ill effects, because patched or unpatched, with GCC
4.4.2 or GCC 4.5 (20091210 snapshot), I get a segmentation fault after an
error is reported on /proc/self/maps. I haven't ruled out the possibility
of a local problem, so don't consider that last part a bug report yet
unless you are already getting that yourself. :)

Original issue reported on code.google.com by true...@gmail.com on 15 Dec 2009 at 9:17

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by markus@chromium.org on 9 Jun 2011 at 10:38