danielmarjamaki (Daniel Marjamäki)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 3 2015, 10:32 PM (120 w, 5 d)

Recent Activity

Thu, Jun 22

danielmarjamaki added inline comments to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.
Thu, Jun 22, 9:41 AM
danielmarjamaki updated the diff for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Fix review comments

Thu, Jun 22, 9:27 AM

Mon, Jun 19

danielmarjamaki abandoned D32346: [clang-tidy] New readability check for strlen argument.

I will not continue working on this checker

Mon, Jun 19, 2:05 AM
danielmarjamaki committed rL305669: [analyzer] Fix logical not for pointers with different bit width.
[analyzer] Fix logical not for pointers with different bit width
Mon, Jun 19, 1:56 AM
danielmarjamaki closed D31029: [analyzer] Fix logical not for pointers with different bit width by committing rL305669: [analyzer] Fix logical not for pointers with different bit width.
Mon, Jun 19, 1:56 AM

May 26 2017

danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

ping

May 26 2017, 1:53 AM
danielmarjamaki added a comment to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

ping

May 26 2017, 1:52 AM

May 16 2017

danielmarjamaki updated the diff for D31029: [analyzer] Fix logical not for pointers with different bit width.

Fix review comments

May 16 2017, 1:27 AM

May 15 2017

danielmarjamaki updated the diff for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

renamed exprComparesTo to svalComparesTo

May 15 2017, 10:47 AM
danielmarjamaki updated the diff for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

minor tweak

May 15 2017, 3:26 AM

May 2 2017

danielmarjamaki committed rL301913: [analyzer] Detect bad free of function pointers.
[analyzer] Detect bad free of function pointers
May 2 2017, 4:59 AM
danielmarjamaki closed D31650: [Analyzer] Detect when function pointer is freed by committing rL301913: [analyzer] Detect bad free of function pointers.
May 2 2017, 4:59 AM

Apr 27 2017

danielmarjamaki added inline comments to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.
Apr 27 2017, 5:34 AM

Apr 25 2017

danielmarjamaki accepted D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

If you have svn write permission then please do it.

Apr 25 2017, 10:15 PM
danielmarjamaki added a comment to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Ping.

Apr 25 2017, 6:34 AM
D30489: [analyzer] catch out of bounds for VLA now requires changes to proceed.

Ping. Any comments?

Apr 25 2017, 6:33 AM
danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

Ping

Apr 25 2017, 6:32 AM
danielmarjamaki added inline comments to D30691: [analyzer] Support for naive cross translational unit analysis.
Apr 25 2017, 4:56 AM
danielmarjamaki added inline comments to D32346: [clang-tidy] New readability check for strlen argument.
Apr 25 2017, 4:04 AM
danielmarjamaki added a comment to D32346: [clang-tidy] New readability check for strlen argument.

I am thinking about making my check more strict so it only warns in allocations. I believe the example code is much more motivating when there is allocation.

Apr 25 2017, 3:45 AM
danielmarjamaki updated the diff for D32346: [clang-tidy] New readability check for strlen argument.

Fixed review comments. Made code examples and documentation more motivational.

Apr 25 2017, 3:28 AM

Apr 24 2017

danielmarjamaki added a comment to D32346: [clang-tidy] New readability check for strlen argument.

Thanks for all comments. I am working on fixing them. Updated patch will be uploaded soon.

Apr 24 2017, 6:50 AM

Apr 21 2017

danielmarjamaki created D32346: [clang-tidy] New readability check for strlen argument.
Apr 21 2017, 3:45 AM

Apr 20 2017

danielmarjamaki added a comment to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

you can ignore my comment ... LGTM

Apr 20 2017, 11:50 PM
danielmarjamaki added a comment to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

I don't have further comments except that I would personally rewrite:

// Get the value of the size argument.
SVal TotalSize = State->getSVal(Arg1, LCtx);
if (SuffixWithN) {
  const Expr *Arg2 = CE->getArg(2);
  TotalSize = evalMulForBufferSize(C, Arg1, Arg2);
}

to:

// Get the value of the size argument.
SVal TotalSize;
if (!SuffixWithN) {
  TotalSize = State->getSVal(Arg1, LCtx);
} else {
  TotalSize = evalMulForBufferSize(C, Arg1, CE->getArg(2));
}
Apr 20 2017, 11:06 PM
danielmarjamaki added inline comments to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.
Apr 20 2017, 2:20 AM

Apr 19 2017

danielmarjamaki added inline comments to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.
Apr 19 2017, 11:11 PM
danielmarjamaki added a comment to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.

I hold the view that I need to respect original developers' code, and it need a Global Patch for Capital variable, just like KDE's Use nullptr everywhere

Apr 19 2017, 10:53 PM
danielmarjamaki requested changes to D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments.
Apr 19 2017, 7:56 AM
danielmarjamaki added a reviewer for D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments: danielmarjamaki.
Apr 19 2017, 7:32 AM
danielmarjamaki added inline comments to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.
Apr 19 2017, 7:23 AM
danielmarjamaki updated the diff for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Fix review comments

  • renamed
  • reorder function arguments (CheckerContext last)
Apr 19 2017, 7:19 AM
danielmarjamaki abandoned D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

I believe https://reviews.llvm.org/D32164 is better

Apr 19 2017, 6:54 AM

Apr 18 2017

danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

Or I can do it for you if you wish.

Apr 18 2017, 5:26 AM
danielmarjamaki added a comment to D31868: [analyzer] Check NULL pointer dereference issue for memset function.

Please click "Done" on fixed review comments.

Apr 18 2017, 3:56 AM
danielmarjamaki added a comment to D30489: [analyzer] catch out of bounds for VLA.

I would propose that I rename and cleanup RangeConstraintManager::uglyEval() and add it. When I tested it, the Z3 does not seem to handle this.

Apr 18 2017, 1:50 AM
danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

I would recommend that this is either fixed soon or that we commit my changes so it can be implemented more properly later. Right now users will see false positives.

Apr 18 2017, 1:38 AM
danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

Ping

Apr 18 2017, 1:36 AM

Apr 12 2017

danielmarjamaki added inline comments to D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions.
Apr 12 2017, 4:38 AM
danielmarjamaki added a reviewer for D31868: [analyzer] Check NULL pointer dereference issue for memset function: danielmarjamaki.
Apr 12 2017, 4:28 AM
danielmarjamaki added a comment to D31868: [analyzer] Check NULL pointer dereference issue for memset function.

Thanks! Looks like a valueable addition.

Apr 12 2017, 4:27 AM
danielmarjamaki added inline comments to D31886: [analyzer] Simplify values in binary operations more aggressively.
Apr 12 2017, 4:12 AM

Apr 7 2017

danielmarjamaki updated the diff for D30489: [analyzer] catch out of bounds for VLA.

This is just work in progress!!

Apr 7 2017, 5:07 AM

Apr 5 2017

danielmarjamaki added a comment to D31650: [Analyzer] Detect when function pointer is freed.

sorry ... I guess that should be something like "void *p = malloc(100);"

Apr 5 2017, 6:42 AM
danielmarjamaki added a comment to D31650: [Analyzer] Detect when function pointer is freed.
In D31650#717691, @NoQ wrote:

Is freeing function pointers always undefined?

Apr 5 2017, 6:38 AM
danielmarjamaki committed rL299523: [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;'….
[analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;'…
Apr 5 2017, 2:09 AM
danielmarjamaki closed D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe by committing rL299523: [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;'….
Apr 5 2017, 2:09 AM

Apr 3 2017

danielmarjamaki requested changes to D30691: [analyzer] Support for naive cross translational unit analysis.
Apr 3 2017, 12:29 AM
danielmarjamaki added inline comments to D30691: [analyzer] Support for naive cross translational unit analysis.
Apr 3 2017, 12:22 AM
danielmarjamaki added a comment to D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe.

Ping

Apr 3 2017, 12:14 AM
danielmarjamaki added a comment to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Ping

Apr 3 2017, 12:13 AM
danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

Ping

Apr 3 2017, 12:13 AM

Mar 31 2017

danielmarjamaki added inline comments to D30691: [analyzer] Support for naive cross translational unit analysis.
Mar 31 2017, 2:32 AM

Mar 23 2017

danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

Are there other cases where makeNull would need to be replaced?

There might be. As I understand it, this is the only known case at the moment.

Mar 23 2017, 9:05 AM
danielmarjamaki updated the diff for D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe.

Updated the patch so all the loss of precision are detected also

Mar 23 2017, 8:54 AM
danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

Are there other cases where makeNull would need to be replaced?

Mar 23 2017, 2:38 AM
danielmarjamaki updated the diff for D31029: [analyzer] Fix logical not for pointers with different bit width.

Added a testcase that will crash without the fix. Used the amdgcn target as that happens to use different pointer bit widths for different address spaces.

Mar 23 2017, 2:31 AM

Mar 22 2017

danielmarjamaki updated the diff for D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe.

I added more testcases. There are several undetected "TODO: loss of precision" right now in the tests that I would like to fix. If this patch to fix FP is accepted I will commit it and continue working on the TODO tests. If it's not accepted I will continue investigating the TODO tests anyway..

Mar 22 2017, 7:19 AM
danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

Well.. feel free to provide an alternative fix. If the message is more specific and it must be enabled explicitly by an option then maybe it's good enough for me.

Mar 22 2017, 6:48 AM
danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

Hi!

There is an option to disable the checking of widening casts. It is enabled by default. You can disable it any time. Or, if you find too much false positives, we can discuss about setting this option to disabled as default.

I am convinced that checking implicit widening casts are also necessary. We should probably change the error message in the implicit case from "misplaced" to "missing", and maybe also rename the checker itself. Separating it to two different checkers, which are almost copy of each other is huge code duplication.

Mar 22 2017, 6:38 AM

Mar 20 2017

danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

I believe there is pointless code in relativeIntSizes etc. If there is for instance "a+b" then the result can't be a char type.

static int relativeIntSizes(BuiltinType::Kind Kind) {
  switch (Kind) {
  case BuiltinType::UChar:
    return 1;
  case BuiltinType::SChar:
    return 1;
  case BuiltinType::Char_U:
    return 1;
  case BuiltinType::Char_S:
    return 1;
  case BuiltinType::UShort:
    return 2;
  case BuiltinType::Short:
    return 2;
  case BuiltinType::UInt:
    return 3;
  case BuiltinType::Int:
    return 3;
  case BuiltinType::ULong:
    return 4;
  case BuiltinType::Long:
    return 4;
  case BuiltinType::ULongLong:
    return 5;
  case BuiltinType::LongLong:
    return 5;
  case BuiltinType::UInt128:
    return 6;
  case BuiltinType::Int128:
    return 6;
  default:
    return 0;
  }
}
Mar 20 2017, 7:28 AM
danielmarjamaki updated the diff for D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

Remove warnings for implicit casts.

Mar 20 2017, 7:09 AM
danielmarjamaki updated the diff for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Fix review comment. Made isShiftOverflow() static.

Mar 20 2017, 5:46 AM
danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

I wonder whether warning on implicit casts still makes sense for example in mission critical code. So maybe it is worth to have a configuration option with the default setting being less strict and chatty. What do you think?

But it's not about "misplaced casts", it's about implicit conversions and -Wconversion diagnostic can take care of this.

Actually, the diagnostics about implicit casts here might be useful (but maybe in a separate check). I have to look again at https://reviews.llvm.org/D17987.

Mar 20 2017, 1:30 AM

Mar 17 2017

danielmarjamaki added a comment to D31097: [clang-tidy] don't warn about implicit widening casts in function calls.

In my opinion, we should stop warning about all implicit casts.

Mar 17 2017, 1:31 PM
danielmarjamaki created D31097: [clang-tidy] don't warn about implicit widening casts in function calls.
Mar 17 2017, 1:01 PM
danielmarjamaki added inline comments to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.
Mar 17 2017, 8:34 AM
danielmarjamaki updated the diff for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Fix review comments

Mar 17 2017, 8:33 AM

Mar 16 2017

danielmarjamaki added a comment to D31029: [analyzer] Fix logical not for pointers with different bit width.

I am not sure where to look. I heard somebody say OpenCL has different pointer widths.

Mar 16 2017, 8:42 AM
danielmarjamaki created D31029: [analyzer] Fix logical not for pointers with different bit width.
Mar 16 2017, 6:48 AM

Mar 15 2017

danielmarjamaki added a comment to D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width.

Ping

Mar 15 2017, 1:40 AM

Mar 8 2017

danielmarjamaki committed rL297283: [analyzer] Clarify 'uninitialized function argument' messages.
[analyzer] Clarify 'uninitialized function argument' messages
Mar 8 2017, 7:34 AM
danielmarjamaki closed D30341: [analyzer] clarify error messages about uninitialized function arguments by committing rL297283: [analyzer] Clarify 'uninitialized function argument' messages.
Mar 8 2017, 7:34 AM

Mar 7 2017

danielmarjamaki committed rL297187: [analyzer] Fix crashes in CastToStruct checker for undefined structs.
[analyzer] Fix crashes in CastToStruct checker for undefined structs
Mar 7 2017, 11:32 AM
danielmarjamaki closed D28297: [StaticAnalyzer] Fix crash in CastToStructChecker by committing rL297187: [analyzer] Fix crashes in CastToStruct checker for undefined structs.
Mar 7 2017, 11:32 AM
danielmarjamaki added a comment to D30489: [analyzer] catch out of bounds for VLA.

Also, in your state dumps no information is actually lost. The fact that the value of variable sz is reg_$0<sz> is trivial: you could ask the Store what's the value of the variable sz and it'd say reg_$0<sz> if there are no bindings over it.

Mar 7 2017, 8:10 AM
danielmarjamaki added reviewers for D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width: zaks.anna, a.sidorin, dcoughlin.
Mar 7 2017, 6:15 AM

Mar 6 2017

danielmarjamaki added a comment to D30341: [analyzer] clarify error messages about uninitialized function arguments.

No the argument is not shown with tilde/column number.

Mar 6 2017, 11:43 PM
danielmarjamaki added a comment to D25728: Test ExprEngine handling of unknown values.

Thanks! That sounds excellent to me.

Mar 6 2017, 11:22 PM

Mar 3 2017

danielmarjamaki updated the diff for D30341: [analyzer] clarify error messages about uninitialized function arguments.

Fix review comment

Mar 3 2017, 6:29 AM
danielmarjamaki added a comment to D30489: [analyzer] catch out of bounds for VLA.

To me it seems that the extent is calculated properly in ArrayBoundsV2.

Mar 3 2017, 3:28 AM

Mar 2 2017

danielmarjamaki added inline comments to D30341: [analyzer] clarify error messages about uninitialized function arguments.
Mar 2 2017, 4:00 PM
danielmarjamaki added inline comments to D30341: [analyzer] clarify error messages about uninitialized function arguments.
Mar 2 2017, 2:27 PM

Mar 1 2017

danielmarjamaki added a comment to D30157: [analyzer] Improve valist check.

I am running this checker right now on various projects. Here are currently seen results.. https://drive.google.com/open?id=0BykPmWrCOxt2STZMOXZ5OGlwM3c

Mar 1 2017, 1:48 AM
danielmarjamaki created D30489: [analyzer] catch out of bounds for VLA.
Mar 1 2017, 1:37 AM

Feb 28 2017

danielmarjamaki added inline comments to D30341: [analyzer] clarify error messages about uninitialized function arguments.
Feb 28 2017, 7:35 AM
danielmarjamaki updated the diff for D30341: [analyzer] clarify error messages about uninitialized function arguments.

minor updates. Use llvm::getOrdinalNumber(). Use llvm::Twine.

Feb 28 2017, 7:27 AM
danielmarjamaki committed rL296477: [Sema] Detect more array index out of bounds when C++ overloaded operators are….
[Sema] Detect more array index out of bounds when C++ overloaded operators are…
Feb 28 2017, 7:05 AM
danielmarjamaki closed D30192: [Sema] Detecting more array index out of bounds by committing rL296477: [Sema] Detect more array index out of bounds when C++ overloaded operators are….
Feb 28 2017, 7:05 AM
danielmarjamaki added reviewers for D28297: [StaticAnalyzer] Fix crash in CastToStructChecker: xazax.hun, dcoughlin, zaks.anna, a.sidorin.
Feb 28 2017, 4:14 AM

Feb 27 2017

danielmarjamaki committed rL296326: [analyzer] clarify 'result is garbage value' when it is out of bounds.
[analyzer] clarify 'result is garbage value' when it is out of bounds
Feb 27 2017, 2:56 AM
danielmarjamaki closed D28278: [StaticAnalyzer] dont show wrong 'garbage value' warning when there is array index out of bounds by committing rL296326: [analyzer] clarify 'result is garbage value' when it is out of bounds.
Feb 27 2017, 2:56 AM

Feb 24 2017

danielmarjamaki added a reviewer for D30192: [Sema] Detecting more array index out of bounds: aaron.ballman.
Feb 24 2017, 8:58 AM
danielmarjamaki created D30341: [analyzer] clarify error messages about uninitialized function arguments.
Feb 24 2017, 8:45 AM
danielmarjamaki updated the diff for D28278: [StaticAnalyzer] dont show wrong 'garbage value' warning when there is array index out of bounds.

Fixed review comment. Broke out function.

Feb 24 2017, 3:40 AM
danielmarjamaki added inline comments to D30157: [analyzer] Improve valist check.
Feb 24 2017, 3:26 AM
danielmarjamaki committed rL296100: [clang-tidy] Fix readability-redundant-declaration false positive.
[clang-tidy] Fix readability-redundant-declaration false positive
Feb 24 2017, 1:14 AM
danielmarjamaki closed D27048: readability-redundant-declaration: fix false positive for static member declaration by committing rL296100: [clang-tidy] Fix readability-redundant-declaration false positive.
Feb 24 2017, 1:14 AM

Feb 23 2017

danielmarjamaki updated the diff for D28278: [StaticAnalyzer] dont show wrong 'garbage value' warning when there is array index out of bounds.

Making the error message more precise.

Feb 23 2017, 11:45 AM
danielmarjamaki abandoned D24861: [Sema] extend Wshift-op-parentheses so it warns for multiplicative operators.

I will not work on this in the near future

Feb 23 2017, 11:17 AM