On Thu, Dec 1, 2016 at 6:58 PM, Martin Sebor wrote:
>> Sure - but then you maybe instead want to check for op being in
>> range [0, max-of-signed-type-of-op] instead? So similar to
>> expr_not_equal_to add a expr_in_range helper?
>>
>> Your function returns true for sizetype
Sure - but then you maybe instead want to check for op being in
range [0, max-of-signed-type-of-op] instead? So similar to
expr_not_equal_to add a expr_in_range helper?
Your function returns true for sizetype vars even if it might be
effectively signed, like for
sizetype i_1 = -4;
i_2 = i_1
On 11/24/2016 05:11 AM, Richard Biener wrote:
where CST is unsigned implying that the lower bound of the offset
is the greater of CST and MIN. For instance, in the following it
determines that bos(p, 0) is 4 (and if the 3 were greater than 7
and overflowed the addition the result would be
On Fri, Nov 11, 2016 at 4:56 PM, Martin Sebor wrote:
> Thanks for the review and comments!
First of all sorry for the late response.
>>
>> @@ -158,14 +170,149 @@ compute_object_offset (const_tree expr, const_tree
>> var)
>>return size_binop (code, base, off);
>> }
>>
>>
Richard,
Attached is a lightly updated patch mostly with just clarifying
comments and a small bug fix. I'd appreciate your input (please
see my reply and questions below). I'm hoping to finalize this
patch based on your feedback so it can be committed soon.
Thanks for the review and comments!
@@ -158,14 +170,149 @@ compute_object_offset (const_tree expr, const_tree var)
return size_binop (code, base, off);
}
+static bool
+operand_unsigned_p (tree op)
+{
+ if (TREE_CODE (op) == SSA_NAME)
new functions need a comment. But maybe you want to
On Tue, Nov 8, 2016 at 5:03 AM, Martin Sebor wrote:
> It's taken me longer than I expected to finally get back to this
> project. Sorry about the delay.
>
> https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01110.html
>
> Attached is an updated patch with this enhancement and
It's taken me longer than I expected to finally get back to this
project. Sorry about the delay.
https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01110.html
Attached is an updated patch with this enhancement and reflecting
you previous comment.
Besides running the GCC test suite I tested the
On 09/16/2016 04:29 AM, Richard Biener wrote:
On Fri, Sep 16, 2016 at 5:29 AM, Martin Sebor wrote:
__builtin_object_size fails for POINTER_PLUS expressions involving
non-constant offsets into objects of known size, causing GCC to fail
to detect (and add instrumentation to
On Fri, Sep 16, 2016 at 12:29:49PM +0200, Richard Biener wrote:
> > PS What would be a good way to arrange for the VRP pass to run before
> > the object size pass so that the latter can benefit more from range
> > information? As an experiment I added another instance of the VRP
> > pass before
On Fri, Sep 16, 2016 at 5:29 AM, Martin Sebor wrote:
> __builtin_object_size fails for POINTER_PLUS expressions involving
> non-constant offsets into objects of known size, causing GCC to fail
> to detect (and add instrumentation to prevent) buffer overflow in
> some basic cases
Hi,
On 16/09/16 13:29, Martin Sebor wrote:
__builtin_object_size fails for POINTER_PLUS expressions involving
non-constant offsets into objects of known size, causing GCC to fail
to detect (and add instrumentation to prevent) buffer overflow in
some basic cases such as the following:
void f
__builtin_object_size fails for POINTER_PLUS expressions involving
non-constant offsets into objects of known size, causing GCC to fail
to detect (and add instrumentation to prevent) buffer overflow in
some basic cases such as the following:
void f (unsigned i)
{
char d [3];
memcpy
13 matches
Mail list logo