This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] Do without on-stack variable length arrays.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 04 Sep 2015 15:14:22 -0700
- Subject: Re: [PATCH] Do without on-stack variable length arrays.
> Is there some simple way that I can test elfutils with fortify or bound
> checking tools?
Depending on your system and build setup, _FORTIFY_SOURCE might be the
default. It's easy enough to enable it with CPPFLAGS=-D_FORTIFY_SOURCE=2
to configure AFAIK.
> How about using pointers and malloc or alloca, and indexing through the
> pointers? That should avoid complaints from stronger bound checkers,
> although static bound checking probably won't find bound error either.
Right, that's what I think it will have to be. The cleanest way to do the
32/64 variant switching is not immediately clear to me in the abstract,
though in each particular instance you'll probably be able to decide easily
enough what feels clean.
> Or is there other pattern preferred by elfutils?
I don't think we've figured anything out.