Re: [RFC v0 0/4] Give a type to constants too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 16, 2017 at 4:43 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Mar 16, 2017 at 1:19 PM, Dibyendu Majumdar
> <mobile@xxxxxxxxxxxxxxx> wrote:
>>
>> The issue is not with the type of %r6 but %arg3 and %arg4 if these
>> happen to be integer constants, and the function is variadic so we
>> cannot work out the type from the function prototype.
>
> Yes. Ok, I see the problem.
>
> I think we could add a 'size' to the pseudo, and solve it that way.
> CSE and other linearization artifacts may mean that the type is
> undefined, but the size should be well-defined.

Sorry for not able to join the discussion earlier. I am catching up
my backlogs of discussion. I have think about this for a while now.
I think there is one alternative solution is just give set_val instruction
a size (not type).

reason being:
1) Necessary for CSE as well.
   If CSE combine two set_val of different size as one pesudo.
   and it is used as two different size. That is likely a bug.
   That is independent of having OP_PUSH or not.

2) Sufficient.
   If we have the size of set_val, we can solve the problem of
   calling function with instant constants and the function is variadic.

That is likely the minimal required change to get both issue
resolved.

Thanks

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux