This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 5 Nov 2013 16:54:38 +0400
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Authentication-results: sourceware.org; auth=none
- References: <20131031091116 dot GD54327 at msticlxl57 dot ims dot intel dot com> <Pine dot LNX dot 4 dot 64 dot 1311012204040 dot 31271 at digraph dot polyomino dot org dot uk>
2013/11/2 Joseph S. Myers <joseph@codesourcery.com>:
> On Thu, 31 Oct 2013, Ilya Enkovich wrote:
>
>> This patch adds support Pointer Bounds Checker into c-family and LTO
>> front-ends. The main purpose of changes in front-end is to register all
>> statically initialized objects for checker. We also need to register
>> such objects created by compiler.
>
> What happens with statically initialized TLS objects? It would seem that
> you need something like how the C++ front end handles static constructors
> for C++11 thread-local objects, but I don't see anything obvious for that
> here.
This patch takes care of pointers initialized by linker. TLS objects
are dynamically allocated for each thread and should have some
constructor to perform initialization. And if there is such
constructors then it should be instrumented by Pointer Bounds Checker.
Therefore it should not require additional changes in front-end,
right?
The only problem I now see for TLS objects is that in my constructors
initialize bounds for an actual TLS object, not for object in .tdata.
How can I refer to .tdata objects in GIMPLE to get correct bounds
initialization for .tdata section?
Thanks,
Ilya
>
> --
> Joseph S. Myers
> joseph@codesourcery.com