[LLVMbugs] [Bug 16450] New: Combining CHECK-DAG and CHECK-NOT sometimes causes an incorrect error-less failure

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 25 13:52:05 PDT 2013


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

            Bug ID: 16450
           Summary: Combining CHECK-DAG and CHECK-NOT sometimes causes an
                    incorrect error-less failure
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: das at mips.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10763
  --> http://llvm.org/bugs/attachment.cgi?id=10763&action=edit
test.txt

Overview:
    Using CHECK-NOT between two CHECK-DAG's may result in a failure with no
error emitted. There are two locations in the CHECK-DAG processing that
CHECK-NOT is processed and one of them is handled incorrectly.

    The one that is incorrect is taking the bool returned by CheckNot(),
casting it to size_t, then comparing it to a large unsigned value. This
comparison is always false whether the pattern is matched or not.

    It seems that the testsuite only checks that successful matches of the
CHECK-NOT pattern trigger failures. I didn't find any tests that check that
unsuccessful matches permits successes.

Steps to reproduce:
    * Run 'FileCheck -input-file test.txt test.txt' using the attached file.
    * echo $?

Expected behaviour:
    * No output
    * Exit with 0

Actual behaviour:
    * No output
    * Exit with 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130625/17d103c3/attachment.html>


More information about the llvm-bugs mailing list