From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============9052203325938734276==" MIME-Version: 1.0 From: Roland McGrath To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] Do without on-stack variable length arrays. Date: Fri, 04 Sep 2015 15:14:22 -0700 Message-ID: <20150904221423.177EA2C3B1E@topped-with-meat.com> In-Reply-To: CAEk9T_3L+5XA4=jGBtw78-0+O97Su_VN=_sKk8pr78HKr_F1Gg@mail.gmail.com --===============9052203325938734276== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > 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=3D-D_FORTIFY_SOURCE= =3D2 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. --===============9052203325938734276==--