On Tue, Oct 16, 2012 at 04:19:09PM -0700, Xinliang David Li wrote:
> I am not sure -- fasan is an error detecting feature -- the goal is to
> find bugs -- missing handling of commons etc. are not desirable.
> Besides if ABI changes consistently for all objects, why does it
> matter?
>
> Or making common/decl_one_only protected under an additional option.
Note that LLVM doesn't protect common vars nor comdat linkage vars either
(at least 3.1 release), as can be seen on
struct A { int a; char b[64]; };
inline A *foo ()
{
static A a;
return &a;
}
A *(*p) () = foo;
C++ testcase and
int i, j, k;
int l = 26;
struct S { char buf[32]; } m, n = { { 1 } };
C testcase. Only p, l and n vars are protected. For common, there is a
possibility to just use -fno-common, unless your sources rely on common
vars.
Jakub