Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

Feed Advanced Search

Fri, Sep 29

void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

Okay, I now have a suggested fix hint. PTAL.

Fri, Sep 29, 12:29 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

FINALLY! found out how to do suggestions for typos.

Fri, Sep 29, 12:29 PM · Restricted Project, Restricted Project

Thu, Sep 28

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add a "FIXME" to improve the diagnostics with a typo hint.

Thu, Sep 28, 5:28 PM · Restricted Project, Restricted Project
void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Thu, Sep 28, 4:19 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Move attribute checking over to SemaDeclAttr.cpp

Thu, Sep 28, 1:02 PM · Restricted Project, Restricted Project

Wed, Sep 27

void added a comment to D144136: Add a "remark" to report on array accesses.

The GitHub repo with this and the counted_by change: https://github.com/bwendling/llvm-project/tree/array-bounds-remarks-with-counted-by

Wed, Sep 27, 11:45 AM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Use CBA as an acronym of CountedByAttribute instead of EBA, which is oldspeak.

Wed, Sep 27, 11:43 AM · Restricted Project, Restricted Project

Tue, Sep 26

void added a comment to D144136: Add a "remark" to report on array accesses.

Can you refresh this patch to work with https://reviews.llvm.org/D148381 ? My testing seems to imply that it doesn't know the size of the array. I assume the if (!IsUnboundedArray) check is incomplete now. i.e. for a __counted_by array, I see the "unknown" remark:

array-bounds.c:341:2: remark: accessing unknown sized array by 'index - 1' [-Rarray-bounds]
  341 |         TEST_ACCESS(p, array, index, SHOULD_TRAP);               
      |         ^

which is from the array-bounds.c test cases:

TEST_SIGNAL(counted_by_enforced_by_sanitizer, SIGILL)
{
        struct annotated *p;
        int index = MAX_INDEX + unconst;

        p = alloc_annotated(index);

        REPORT_SIZE(p->array);
        TEST_ACCESS(p, array, index, SHOULD_TRAP);
}
Tue, Sep 26, 2:07 PM · Restricted Project, Restricted Project

Thu, Sep 21

void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

Friendly Ping.

Thu, Sep 21, 12:31 PM · Restricted Project, Restricted Project

Mon, Sep 18

void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Mon, Sep 18, 1:32 PM · Restricted Project, Restricted Project

Fri, Sep 15

void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

Added more error messages. Changed some code around to align with coding practices. Added some more test cases.

Doing a full "allmodconfig" Linux kernel build with my 200ish __counted_by annotations is building cleanly. Yay! :)

Fri, Sep 15, 3:37 PM · Restricted Project, Restricted Project

Thu, Sep 14

void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Thu, Sep 14, 1:35 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add release note.

Thu, Sep 14, 1:48 AM · Restricted Project, Restricted Project

Wed, Sep 13

void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Wed, Sep 13, 4:44 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Added more error messages. Changed some code around to align with coding practices. Added some more test cases.

Wed, Sep 13, 4:44 PM · Restricted Project, Restricted Project

Tue, Sep 12

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

This is ready for review. Please take a look.

Tue, Sep 12, 5:18 PM · Restricted Project, Restricted Project

Fri, Sep 8

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add test output when the attribute isn't used.

Fri, Sep 8, 4:26 PM · Restricted Project, Restricted Project
void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Fri, Sep 8, 4:19 PM · Restricted Project, Restricted Project
void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Fri, Sep 8, 4:16 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix docs to use the correct code examples throughout.

Fri, Sep 8, 4:15 PM · Restricted Project, Restricted Project
void updated the summary of D148381: [Clang] Implement the 'counted_by' attribute.
Fri, Sep 8, 4:12 PM · Restricted Project, Restricted Project
void retitled D148381: [Clang] Implement the 'counted_by' attribute from [Clang] Implement the counted_by attribute to [Clang] Implement the 'counted_by' attribute.
Fri, Sep 8, 4:10 PM · Restricted Project, Restricted Project
void retitled D148381: [Clang] Implement the 'counted_by' attribute from [Clang] Add counted_by attribute to [Clang] Implement the counted_by attribute.
Fri, Sep 8, 3:58 PM · Restricted Project, Restricted Project
void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

I changed more than just the testcase (not a lot, but non-trivial nonetheless). PTAL.

Fri, Sep 8, 3:29 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Remove unneded extern decl from test.

Fri, Sep 8, 3:22 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.
  • Expand test to show the unsanitized version,
  • Unify the ways of finding a specific field based on a predicate,
  • Make sure we're using the correct types in a couple of key places.
Fri, Sep 8, 3:20 PM · Restricted Project, Restricted Project

Wed, Sep 6

void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

I can generate warnings for anonymous structs were the __counted_by member is reported as "not found". For example:

little.c:7:28: warning: counted_by field 'count' not found
    7 |                 int array[] __counted_by(count);
      |                                          ^~~~~

For this:

#define __counted_by(member)   __attribute__((__counted_by__(member)))

struct anon {
        unsigned long flags;
        struct {
                unsigned char count;
                int array[] __counted_by(count);
        };
};

extern void bar(int input);

void foo(struct anon *p, int index)
{
        bar(p->array[index]);
}

I'll look into this.

Wed, Sep 6, 1:14 PM · Restricted Project, Restricted Project
void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

This is now ready for a non-WIP review. PTAL. :-)

Wed, Sep 6, 3:18 AM · Restricted Project, Restricted Project

Tue, Sep 5

void committed rG3e19b10b02a7: Partial revert of b0cbf3a0dac5 (authored by void).
Partial revert of b0cbf3a0dac5
Tue, Sep 5, 4:19 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Update documentation. Cribbed off of Qing Zhao's GCC implementation.

Tue, Sep 5, 3:10 PM · Restricted Project, Restricted Project
void retitled D148381: [Clang] Implement the 'counted_by' attribute from [WIP][Clang] Add counted_by attribute to [Clang] Add counted_by attribute.
Tue, Sep 5, 1:13 PM · Restricted Project, Restricted Project
void committed rGb0cbf3a0dac5: [NFC] remove unneded header includes (authored by void).
[NFC] remove unneded header includes
Tue, Sep 5, 1:13 PM · Restricted Project, Restricted Project
void committed rG7d6283fd0901: [NFC] Remove unneeded header includes (authored by void).
[NFC] Remove unneeded header includes
Tue, Sep 5, 1:13 PM · Restricted Project, Restricted Project
void closed D159435: [NFC] remove unneded header includes.
Tue, Sep 5, 1:12 PM · Restricted Project, Restricted Project
void closed D159421: [NFC] Remove unneeded header includes.
Tue, Sep 5, 1:12 PM · Restricted Project, Restricted Project

Mon, Sep 4

void requested review of D159435: [NFC] remove unneded header includes.
Mon, Sep 4, 5:54 PM · Restricted Project, Restricted Project
void requested review of D159421: [NFC] Remove unneeded header includes.
Mon, Sep 4, 2:44 AM · Restricted Project, Restricted Project

Sep 1 2023

void committed rG671365225ccc: [NFC] Cleanup some #includes in header files (authored by void).
[NFC] Cleanup some #includes in header files
Sep 1 2023, 3:24 PM · Restricted Project, Restricted Project
void closed D159320: [NFC] Cleanup some #includes in header files.
Sep 1 2023, 3:24 PM · Restricted Project, Restricted Project

Aug 31 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix testcase.

Aug 31 2023, 6:28 PM · Restricted Project, Restricted Project
void requested review of D159320: [NFC] Cleanup some #includes in header files.
Aug 31 2023, 5:39 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Remove un-needed change.

Aug 31 2023, 3:25 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add a few more tests to the codegen testcase.

Aug 31 2023, 2:42 PM · Restricted Project, Restricted Project

Aug 30 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add testcases.

Aug 30 2023, 11:32 AM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add more diagnostics.

Aug 30 2023, 10:12 AM · Restricted Project, Restricted Project

Aug 29 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix some issues Nick pointed out.

Aug 29 2023, 5:23 PM · Restricted Project, Restricted Project
void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

I assume you plan to add some clang CodeGen tests at some point?

Aug 29 2023, 5:23 PM · Restricted Project, Restricted Project
void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

Jumping a bit late in the thread, apologize in advance if I missed something.

The GCC version of the attributes seems to be element_count (as found in the link https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 mentionned by @kees) I guess we could align (I personally prefer the GCC name, FWIW)

Aug 29 2023, 4:54 PM · Restricted Project, Restricted Project

Aug 28 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Move the isFlexibleArrayMemberLike fully into Decl and fix tests.

Aug 28 2023, 3:50 PM · Restricted Project, Restricted Project

Aug 25 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Modify sanitize scope to avoid the instruction creation.

Aug 25 2023, 5:56 PM · Restricted Project, Restricted Project

Aug 22 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix clang-ast-dump issue.

Aug 22 2023, 6:19 PM · Restricted Project, Restricted Project
void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Aug 22 2023, 6:09 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Address Nick's comments.

Aug 22 2023, 6:09 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Support when doing a _bdos on the full structure.

Aug 22 2023, 5:06 AM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix a segfault.

Aug 22 2023, 3:59 AM · Restricted Project, Restricted Project

Aug 21 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Make builtin_dynamic_object_size use the counted_by attribute to help determine the object size.

Aug 21 2023, 6:55 PM · Restricted Project, Restricted Project

Aug 10 2023

void retitled D148381: [Clang] Implement the 'counted_by' attribute from [WIP][Clang] Add element_count attribute to [WIP][Clang] Add counted_by attribute.
Aug 10 2023, 8:19 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Update to more match Qing's GCC implementation.

Aug 10 2023, 8:18 PM · Restricted Project, Restricted Project

Jul 14 2023

void accepted D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes.
Jul 14 2023, 4:04 PM · Restricted Project, Restricted Project
void accepted D155236: [ConstantHoisting] use struct rather than tuple for adjustments.

Bueno!

Jul 14 2023, 3:58 PM · Restricted Project, Restricted Project
void accepted D155336: [clang][JumpDiagnostics] bring VerifyIndirectOrAsmJumps to C++17.
Jul 14 2023, 2:52 PM · Restricted Project, Restricted Project
void accepted D155336: [clang][JumpDiagnostics] bring VerifyIndirectOrAsmJumps to C++17.
Jul 14 2023, 2:04 PM · Restricted Project, Restricted Project
void added a comment to D155236: [ConstantHoisting] use struct rather than tuple for adjustments.

I'm not familiar with this code, but why not place the information into ConstantUser instead? Or maybe make the struct a private member of ConstantHoistingPass.

Jul 14 2023, 11:47 AM · Restricted Project, Restricted Project

Jul 11 2023

void accepted D154996: [ConstantHoisting] use BasicBlock::getFirstInsertionPt NFC.

Nice catch!

Jul 11 2023, 11:53 AM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Rebasing

Jul 11 2023, 11:47 AM · Restricted Project, Restricted Project

May 22 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add bounds checking for the "ArrayBounds" saniziter kind.

May 22 2023, 5:31 PM · Restricted Project, Restricted Project

May 11 2023

void updated the summary of D148381: [Clang] Implement the 'counted_by' attribute.
May 11 2023, 12:27 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Use strings for the attribute argument.

May 11 2023, 12:16 PM · Restricted Project, Restricted Project

May 4 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Use "Expected" for the SourceRange imports.

May 4 2023, 12:33 PM · Restricted Project, Restricted Project

May 1 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Improve error message to use the unknown field's name.

May 1 2023, 1:12 PM · Restricted Project, Restricted Project

Apr 28 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Change sanitizer scope because instructions may be created.

Apr 28 2023, 6:02 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix the way the source ranges are imported via the ASTImporter.
Do other minor fixes according to feedback.

Apr 28 2023, 12:14 PM · Restricted Project, Restricted Project
void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Apr 28 2023, 12:14 PM · Restricted Project, Restricted Project

Apr 27 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Use the new memory location.

Apr 27 2023, 3:34 PM · Restricted Project, Restricted Project
void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

This is a precursor to specifying the field with the designated initializer syntax. Therefore, it may be a bit cumbersome.

Apr 27 2023, 2:01 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix ICE when the FD isn't found.

Apr 27 2023, 1:50 PM · Restricted Project, Restricted Project
void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Add the ability to specify a "path" to the element count if it resides within a sub-structure.

Apr 27 2023, 1:45 PM · Restricted Project, Restricted Project

Apr 18 2023

void added a comment to D146169: Non-debuginfo JITLink perf jitdump support.

I think this change is causing build failures. Could you take a look?

Apr 18 2023, 2:34 PM · Restricted Project, Restricted Project
void committed rGb51a03e1bbe7: [Clang][NFC] Rename methods/vars to reflect their real usage (authored by void).
[Clang][NFC] Rename methods/vars to reflect their real usage
Apr 18 2023, 1:48 PM · Restricted Project, Restricted Project, Restricted Project
void closed D147743: [Clang][NFC] Rename methods/vars to reflect their real usage.
Apr 18 2023, 1:48 PM · Restricted Project, Restricted Project, Restricted Project
void updated the diff for D147743: [Clang][NFC] Rename methods/vars to reflect their real usage.

Add comment.

Apr 18 2023, 1:47 PM · Restricted Project, Restricted Project, Restricted Project

Apr 17 2023

void updated the diff for D148381: [Clang] Implement the 'counted_by' attribute.

Fix failing testcase.

Apr 17 2023, 4:31 PM · Restricted Project, Restricted Project
void added inline comments to D148381: [Clang] Implement the 'counted_by' attribute.
Apr 17 2023, 2:34 PM · Restricted Project, Restricted Project
void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

Cool!

How about some codegen tests?

I'll add those to the next iteration. :-)

Apr 17 2023, 2:14 PM · Restricted Project, Restricted Project
void updated the diff for D147743: [Clang][NFC] Rename methods/vars to reflect their real usage.

Reformat.

Apr 17 2023, 2:02 PM · Restricted Project, Restricted Project, Restricted Project
void added a comment to D147743: [Clang][NFC] Rename methods/vars to reflect their real usage.

Friendly ping.

Apr 17 2023, 2:01 PM · Restricted Project, Restricted Project, Restricted Project

Apr 14 2023

void added a comment to D148381: [Clang] Implement the 'counted_by' attribute.

Note: This is a work-in-progress, so there's no need for a formal review, though any suggestions will definitely be appreciated. :-)

Apr 14 2023, 3:56 PM · Restricted Project, Restricted Project
void requested review of D148381: [Clang] Implement the 'counted_by' attribute.
Apr 14 2023, 2:27 PM · Restricted Project, Restricted Project

Apr 7 2023

void updated the diff for D147743: [Clang][NFC] Rename methods/vars to reflect their real usage.

Fix compilation issue.

Apr 7 2023, 12:33 PM · Restricted Project, Restricted Project, Restricted Project
void added a comment to D147580: [Clang][NFC] Refactor "Designators" to be more similar.

I guess I should have waited till I saw: https://reviews.llvm.org/D147673

Apr 7 2023, 11:43 AM · Restricted Project, Restricted Project
void committed rG2cbf5127d585: [Clang] Improve designated inits diagnostic location (authored by void).
[Clang] Improve designated inits diagnostic location
Apr 7 2023, 11:37 AM · Restricted Project, Restricted Project
void closed D147673: [Clang] Improve designated inits diagnostic location.
Apr 7 2023, 11:37 AM · Restricted Project, Restricted Project
void added inline comments to D147673: [Clang] Improve designated inits diagnostic location.
Apr 7 2023, 11:36 AM · Restricted Project, Restricted Project

Apr 6 2023

void requested review of D147743: [Clang][NFC] Rename methods/vars to reflect their real usage.
Apr 6 2023, 2:36 PM · Restricted Project, Restricted Project, Restricted Project
void added reviewers for D147673: [Clang] Improve designated inits diagnostic location: rjmccall, aaron.ballman, dblaikie, shafik.
Apr 6 2023, 2:33 PM · Restricted Project, Restricted Project
void abandoned D92156: [PowerPC] Add support for "tlbiel" with two arguments.
Apr 6 2023, 2:32 PM · Restricted Project, Restricted Project
void abandoned D70929: Don't extract code containing an indirect jump from a callbr.
Apr 6 2023, 2:31 PM · Restricted Project, Restricted Project
void abandoned D120094: [CallingConv] Generate isCCArgumentReg() predicate via tablegen.
Apr 6 2023, 2:31 PM · Restricted Project, Restricted Project
void abandoned D126083: [AArch64] Use proper instruction mnemonics for FPRs.
Apr 6 2023, 2:30 PM · Restricted Project, Restricted Project
void abandoned D120942: [PowerPC] Add support for the canonical version of tlbie.
Apr 6 2023, 2:30 PM · Restricted Project, Restricted Project