[LLVMbugs] [Bug 3674] New: scan-build ignores -ffreestanding

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Feb 26 13:20:08 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3674

           Summary: scan-build ignores -ffreestanding
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ed at 80386.nl
                CC: llvmbugs at cs.uiuc.edu


When using scan-build to perform some analysis on the FreeBSD kernel, it seems
to ignore -ffreestanding, so we get a whole bunch of files that won't be
processed, because they call FreeBSD's kernelspace malloc(), which uses a
different set of arguments.

../../../dev/acpica/acpi_ec.c:327:52: error: too many arguments to function
call
    params = malloc(sizeof(struct acpi_ec_params), M_TEMP, M_WAITOK | M_ZERO);
             ~~~~~~                                ^~~~~~~~~~~~~~~~~~~~~~~~~

I guess it would eventually be nice if there was some kind of feature to test
if malloc() return values are tested for NULL. In the FreeBSD kernel, this is
only needed when M_NOWAIT is used, instead of M_WAITOK. This is probably a lot
harder...


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list