DragonFly kernel List (threaded) for 2008-06
DragonFly BSD
DragonFly kernel List (threaded) for 2008-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: GSoC 2008 dma enhancements


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jun 2008 17:08:01 -0700 (PDT)

    Lets not turn this into a bikeshed that I am then forced to terminate!

    In anycase, old-time DragonFly developers will remember when we started
    ripping out all uses of sprintf(), strcpy, and the like from the kernel,
    and replaced them with e.g. snprintf().

    My personal viewpoint is that one should always code defensively, no
    matter what the language.  And I'm not just talking about buffer overflow
    issues, I've seen people get into trouble many times with Java by
    chosing horrible non-scaling algorithms which blow out available memory
    (as one example).

    In the case of C, its a combination of avoiding certain very dangerous
    functions like strcpy(), and asserting non-obvious things that should be
    true to catch coding bugs.

    For a laugh, grep out the number of KKASSERT lines I have in the HAMMER
    filesystem source code.

						-Matt




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