On Wed, Mar 18, 2015 at 10:34 AM, Ilya Enkovich
>>>> It doesn't mean we should leave a door open.  Are we supposed to
>>>> detect this with MPX:
>>>>
>>>> [hjl@skylakeclient bug-1]$ cat x.c
>>>> #include <string.h>
>>>>
>>>> int
>>>> main ()
>>>> {
>>>>   char buf[10];
>>>>   memset(buf, 'a', 11);
>>>>   return 0;
>>>> }
>>>> [hjl@skylakeclient bug-1]$
>>>>
>>>> I believe we should, not maybe.  We shouldn't silent fail it
>>>> when linker doesn't support -z bndplt.
>>>
>>> It depends on compiler flags and libraries used and is up to user to
>>> decide. User may be warned during libmpx configuration.
>>>
>>
>> What is "USER"?  The one who build GCC may not be same
>> person who uses GCC.
>>
>
> The person who build GCC determines its default behavior. User either
> uses it with default settings or overwrites it with own flags. You may
> warn the person who build GCC that his config has no '-z bndplt' by
> default.
>

Person who use GCC have no idea about it.  That is why we
should always pass -z bndplt to ld if MPX is enabled.  Otherwise,
Person who use GCC may falsely believe him/her are covered by
MPX.

-- 
H.J.

Reply via email to