Proposal to add support for structure inner elements in Asan

2016-12-01 Thread steven shi
Hello, With the experts' help in this community, I've enabled the Asan for global and stack buffer in my bare-mental platform firmware, thanks a lot. But I find the current Asan doesn't support to protect the structure inner elements, E.g. the global_array[11] in below code. Unfortunately, most

Re: Proposal to add support for structure inner elements in Asan

2016-12-01 Thread Maxim Ostapenko
пятница, 2 декабря 2016 г., 8:22:55 UTC+3 пользователь Yuri Gribov написал: > > On Fri, Dec 2, 2016 at 6:35 AM, Maxim Ostapenko > wrote: > > Hi, > > > > 02 Дек 2016 г. 7:30 пользователь "steven shi" > > > написал: > >> > >> Hello, > >> With the

Re: Proposal to add support for structure inner elements in Asan

2016-12-01 Thread Konstantin Serebryany
This is much harder than it sounds. I've made an attempt ~2 years ago and it almost, but not quite entirely, worked https://github.com/google/sanitizers/wiki/AddressSanitizerIntraObjectOverflow (Only for non POD objects in C++, so it won't directly apply to C at all) And I totally agree that

Re: Proposal to add support for structure inner elements in Asan

2016-12-01 Thread Yuri Gribov
Just curious, why did you chose to break ABI rather than reuse natural padding? As for complexity - was it caused by user code relying on implementation details (e.g. exact struct layout) or something else? On Fri, Dec 2, 2016 at 8:18 AM, Konstantin Serebryany

Re: Proposal to add support for structure inner elements in Asan

2016-12-01 Thread Maxim Ostapenko
Hi, 02 Дек 2016 г. 7:30 пользователь "steven shi" написал: > > Hello, > With the experts' help in this community, I've enabled the Asan for global and stack buffer in my bare-mental platform firmware, thanks a lot. > But I find the current Asan doesn't support to protect

Re: Proposal to add support for structure inner elements in Asan

2016-12-01 Thread Yuri Gribov
On Fri, Dec 2, 2016 at 6:35 AM, Maxim Ostapenko wrote: > Hi, > > 02 Дек 2016 г. 7:30 пользователь "steven shi" > написал: >> >> Hello, >> With the experts' help in this community, I've enabled the Asan for global >> and stack buffer in my bare-mental

Re: Proposal to add support for structure inner elements in Asan

2016-12-01 Thread Yuri Gribov
On Fri, Dec 2, 2016 at 7:22 AM, Yuri Gribov wrote: > On Fri, Dec 2, 2016 at 6:35 AM, Maxim Ostapenko wrote: >> Hi, >> >> 02 Дек 2016 г. 7:30 пользователь "steven shi" >> написал: >>> >>> Hello, >>> With the experts' help in this