Re: memset bugs.

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

 



On Fri, Nov 27, 2009 at 1:26 AM, Roopesh Majeti
<roopesh.majeti@xxxxxxxxx> wrote:
> Hi All,
> Iam new to this fedora world.. a small question on the below discussion:
> It is mentioned that having, zero in the third argument is legitimate use
> cases. Can somebody direct me to such a use case, as i feel, giving memset a
> zero, is asking it, not to do anything [ might have side effects, not sure
> from my end, though ].

It's legitimate because the zero may ultimately be derived from macro values
and restructuring the code to avoid the memset depending on defined values
may be non-trivial or even impossible.

John Reiser provided a good example:
http://www.linux-archive.org/fedora-development/286221-memset-bugs.html

Where its not a programming bug the memset(,,0) is harmless: GCC optimizes it
out completely.

A literal zero prior to preprocessing is either a bug, or some kind of dead-
code causing place-holder.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux