martong (Gabor Marton)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 10 2017, 8:01 AM (14 w, 11 h)

Recent Activity

Dec 7 2017

martong added inline comments to D40937: [clang-tidy] Infinite loop checker.
Dec 7 2017, 5:23 AM · Restricted Project

Nov 15 2017

martong added a comment to D39965: [Analyzer] Split Critical Sections.

This checker will miss lock objects. In C++, RAII lock objects are preferred over mutex.lock() and mutex.unlock() pairs.

Nov 15 2017, 3:30 AM
martong added a comment to D39965: [Analyzer] Split Critical Sections.

There are valid cases to use short but different critical sections within the same function for the same mutex.
For instance, one implementation of a readers-writer lock uses two short critical sections in the read side (https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Using_two_mutexes)

Nov 15 2017, 3:28 AM

Oct 20 2017

martong added a comment to D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc.

We might get false positives in case of certain substring operations.
Consider the case of copying a substring, pseudo code below:

const char * s = "abcdefg";
int offset = my_find('d', s);
// I want to copy "defg"
char *new_subststring = (char*) malloc(strlen(s + offset));
strcpy(...);
Oct 20 2017, 7:11 AM · Restricted Project
martong added a comment to D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc.

Consider the use of a function pointer:

void* malloc(int);
int strlen(char*);
auto fp = malloc;
void bad_malloc(char *str) { char *c = (char *)fp(strlen(str + 1)); }

I think, the checker will not match in this case.

Oct 20 2017, 6:57 AM · Restricted Project

Oct 12 2017

martong accepted D38728: [analyzer] Use the signature of the primary template for issue hash calculation.
Oct 12 2017, 2:18 AM

Oct 11 2017

martong added inline comments to D38728: [analyzer] Use the signature of the primary template for issue hash calculation.
Oct 11 2017, 5:41 AM

Oct 10 2017

martong added inline comments to D38728: [analyzer] Use the signature of the primary template for issue hash calculation.
Oct 10 2017, 8:42 AM