mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
CPP: Add tests for false positive in memory vulnerability queries.
This commit is contained in:
@@ -15553,6 +15553,169 @@ ir.cpp:
|
||||
# 2030| Type = [IntType] int
|
||||
# 2030| ValueCategory = prvalue
|
||||
# 2031| getStmt(2): [ReturnStmt] return ...
|
||||
# 2033| [TopLevelFunction] void NewDeleteMem()
|
||||
# 2033| <params>:
|
||||
# 2033| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2034| getStmt(0): [DeclStmt] declaration
|
||||
# 2034| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x
|
||||
# 2034| Type = [IntPointerType] int *
|
||||
# 2034| getVariable().getInitializer(): [Initializer] initializer for x
|
||||
# 2034| getExpr(): [NewExpr] new
|
||||
# 2034| Type = [IntPointerType] int *
|
||||
# 2034| ValueCategory = prvalue
|
||||
# 2035| getStmt(1): [ExprStmt] ExprStmt
|
||||
# 2035| getExpr(): [AssignExpr] ... = ...
|
||||
# 2035| Type = [IntType] int
|
||||
# 2035| ValueCategory = lvalue
|
||||
# 2035| getLValue(): [PointerDereferenceExpr] * ...
|
||||
# 2035| Type = [IntType] int
|
||||
# 2035| ValueCategory = lvalue
|
||||
# 2035| getOperand(): [VariableAccess] x
|
||||
# 2035| Type = [IntPointerType] int *
|
||||
# 2035| ValueCategory = prvalue(load)
|
||||
# 2035| getRValue(): [Literal] 6
|
||||
# 2035| Type = [IntType] int
|
||||
# 2035| Value = [Literal] 6
|
||||
# 2035| ValueCategory = prvalue
|
||||
# 2036| getStmt(2): [ExprStmt] ExprStmt
|
||||
# 2036| getExpr(): [DeleteExpr] delete
|
||||
# 2036| Type = [VoidType] void
|
||||
# 2036| ValueCategory = prvalue
|
||||
# 2036| getExpr(): [VariableAccess] x
|
||||
# 2036| Type = [IntPointerType] int *
|
||||
# 2036| ValueCategory = prvalue(load)
|
||||
# 2037| getStmt(3): [ReturnStmt] return ...
|
||||
# 2039| [CopyAssignmentOperator] Base2& Base2::operator=(Base2 const&)
|
||||
# 2039| <params>:
|
||||
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
|
||||
#-----| Type = [LValueReferenceType] const Base2 &
|
||||
# 2039| [Constructor] void Base2::Base2()
|
||||
# 2039| <params>:
|
||||
# 2039| <initializations>:
|
||||
# 2039| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2039| getStmt(0): [ReturnStmt] return ...
|
||||
# 2039| [CopyConstructor] void Base2::Base2(Base2 const&)
|
||||
# 2039| <params>:
|
||||
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
|
||||
#-----| Type = [LValueReferenceType] const Base2 &
|
||||
# 2041| [MemberFunction] void Base2::operator delete(void*)
|
||||
# 2041| <params>:
|
||||
# 2041| getParameter(0): [Parameter] p
|
||||
# 2041| Type = [VoidPointerType] void *
|
||||
# 2041| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2042| getStmt(0): [ReturnStmt] return ...
|
||||
# 2043| [Destructor,VirtualFunction] void Base2::~Base2()
|
||||
# 2043| <params>:
|
||||
# 2043| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2043| getStmt(0): [ReturnStmt] return ...
|
||||
# 2043| <destructions>:
|
||||
# 2046| [CopyAssignmentOperator] Derived2& Derived2::operator=(Derived2 const&)
|
||||
# 2046| <params>:
|
||||
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
|
||||
#-----| Type = [LValueReferenceType] const Derived2 &
|
||||
# 2046| [Constructor] void Derived2::Derived2()
|
||||
# 2046| <params>:
|
||||
# 2046| <initializations>:
|
||||
# 2046| getInitializer(0): [ConstructorDirectInit] call to Base2
|
||||
# 2046| Type = [VoidType] void
|
||||
# 2046| ValueCategory = prvalue
|
||||
# 2046| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2046| getStmt(0): [ReturnStmt] return ...
|
||||
# 2046| [CopyConstructor] void Derived2::Derived2(Derived2 const&)
|
||||
# 2046| <params>:
|
||||
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
|
||||
#-----| Type = [LValueReferenceType] const Derived2 &
|
||||
# 2049| [Destructor,VirtualFunction] void Derived2::~Derived2()
|
||||
# 2049| <params>:
|
||||
# 2049| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2049| getStmt(0): [ReturnStmt] return ...
|
||||
# 2049| <destructions>:
|
||||
# 2049| getDestruction(0): [DestructorDirectDestruction] call to ~Base2
|
||||
# 2049| Type = [VoidType] void
|
||||
# 2049| ValueCategory = prvalue
|
||||
# 2051| [MemberFunction] void Derived2::operator delete(void*)
|
||||
# 2051| <params>:
|
||||
# 2051| getParameter(0): [Parameter] p
|
||||
# 2051| Type = [VoidPointerType] void *
|
||||
# 2051| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2052| getStmt(0): [ReturnStmt] return ...
|
||||
# 2056| [TopLevelFunction] int virtual_delete()
|
||||
# 2056| <params>:
|
||||
# 2057| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2058| getStmt(0): [DeclStmt] declaration
|
||||
# 2058| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b1
|
||||
# 2058| Type = [PointerType] Base2 *
|
||||
# 2058| getVariable().getInitializer(): [Initializer] initializer for b1
|
||||
# 2058| getExpr(): [NewExpr] new
|
||||
# 2058| Type = [PointerType] Base2 *
|
||||
# 2058| ValueCategory = prvalue
|
||||
# 2058| getInitializer(): [ConstructorCall] call to Base2
|
||||
# 2058| Type = [VoidType] void
|
||||
# 2058| ValueCategory = prvalue
|
||||
# 2059| getStmt(1): [ExprStmt] ExprStmt
|
||||
# 2059| getExpr(): [DeleteExpr] delete
|
||||
# 2059| Type = [VoidType] void
|
||||
# 2059| ValueCategory = prvalue
|
||||
# 2059| getDeallocatorCall(): [FunctionCall] call to operator delete
|
||||
# 2059| Type = [VoidType] void
|
||||
# 2059| ValueCategory = prvalue
|
||||
# 2059| getDestructorCall(): [DestructorCall] call to ~Base2
|
||||
# 2059| Type = [VoidType] void
|
||||
# 2059| ValueCategory = prvalue
|
||||
# 2059| getQualifier(): [VariableAccess] b1
|
||||
# 2059| Type = [PointerType] Base2 *
|
||||
# 2059| ValueCategory = prvalue(load)
|
||||
# 2061| getStmt(2): [DeclStmt] declaration
|
||||
# 2061| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b2
|
||||
# 2061| Type = [PointerType] Base2 *
|
||||
# 2061| getVariable().getInitializer(): [Initializer] initializer for b2
|
||||
# 2061| getExpr(): [NewExpr] new
|
||||
# 2061| Type = [PointerType] Derived2 *
|
||||
# 2061| ValueCategory = prvalue
|
||||
# 2061| getInitializer(): [ConstructorCall] call to Derived2
|
||||
# 2061| Type = [VoidType] void
|
||||
# 2061| ValueCategory = prvalue
|
||||
# 2061| getExpr().getFullyConverted(): [CStyleCast] (Base2 *)...
|
||||
# 2061| Conversion = [BaseClassConversion] base class conversion
|
||||
# 2061| Type = [PointerType] Base2 *
|
||||
# 2061| ValueCategory = prvalue
|
||||
# 2062| getStmt(3): [ExprStmt] ExprStmt
|
||||
# 2062| getExpr(): [DeleteExpr] delete
|
||||
# 2062| Type = [VoidType] void
|
||||
# 2062| ValueCategory = prvalue
|
||||
# 2062| getDeallocatorCall(): [FunctionCall] call to operator delete
|
||||
# 2062| Type = [VoidType] void
|
||||
# 2062| ValueCategory = prvalue
|
||||
# 2062| getDestructorCall(): [DestructorCall] call to ~Base2
|
||||
# 2062| Type = [VoidType] void
|
||||
# 2062| ValueCategory = prvalue
|
||||
# 2062| getQualifier(): [VariableAccess] b2
|
||||
# 2062| Type = [PointerType] Base2 *
|
||||
# 2062| ValueCategory = prvalue(load)
|
||||
# 2064| getStmt(4): [DeclStmt] declaration
|
||||
# 2064| getDeclarationEntry(0): [VariableDeclarationEntry] definition of d
|
||||
# 2064| Type = [PointerType] Derived2 *
|
||||
# 2064| getVariable().getInitializer(): [Initializer] initializer for d
|
||||
# 2064| getExpr(): [NewExpr] new
|
||||
# 2064| Type = [PointerType] Derived2 *
|
||||
# 2064| ValueCategory = prvalue
|
||||
# 2064| getInitializer(): [ConstructorCall] call to Derived2
|
||||
# 2064| Type = [VoidType] void
|
||||
# 2064| ValueCategory = prvalue
|
||||
# 2065| getStmt(5): [ExprStmt] ExprStmt
|
||||
# 2065| getExpr(): [DeleteExpr] delete
|
||||
# 2065| Type = [VoidType] void
|
||||
# 2065| ValueCategory = prvalue
|
||||
# 2065| getDeallocatorCall(): [FunctionCall] call to operator delete
|
||||
# 2065| Type = [VoidType] void
|
||||
# 2065| ValueCategory = prvalue
|
||||
# 2065| getDestructorCall(): [DestructorCall] call to ~Derived2
|
||||
# 2065| Type = [VoidType] void
|
||||
# 2065| ValueCategory = prvalue
|
||||
# 2065| getQualifier(): [VariableAccess] d
|
||||
# 2065| Type = [PointerType] Derived2 *
|
||||
# 2065| ValueCategory = prvalue(load)
|
||||
# 2066| getStmt(6): [ReturnStmt] return ...
|
||||
perf-regression.cpp:
|
||||
# 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&)
|
||||
# 4| <params>:
|
||||
|
||||
@@ -9636,6 +9636,180 @@
|
||||
| ir.cpp:2030:22:2030:22 | Arg(0) | 0:r2030_3 |
|
||||
| ir.cpp:2030:22:2030:22 | Load | m2026_6 |
|
||||
| ir.cpp:2030:26:2030:27 | Unary | r2030_7 |
|
||||
| ir.cpp:2033:6:2033:17 | ChiPartial | partial:m2033_3 |
|
||||
| ir.cpp:2033:6:2033:17 | ChiTotal | total:m2033_2 |
|
||||
| ir.cpp:2033:6:2033:17 | SideEffect | ~m2036_6 |
|
||||
| ir.cpp:2034:8:2034:8 | Address | &:r2034_1 |
|
||||
| ir.cpp:2034:12:2034:18 | Address | &:r2034_4 |
|
||||
| ir.cpp:2034:12:2034:18 | Arg(0) | 0:r2034_3 |
|
||||
| ir.cpp:2034:12:2034:18 | CallTarget | func:r2034_2 |
|
||||
| ir.cpp:2034:12:2034:18 | ChiPartial | partial:m2034_5 |
|
||||
| ir.cpp:2034:12:2034:18 | ChiTotal | total:m2033_4 |
|
||||
| ir.cpp:2034:12:2034:18 | SideEffect | ~m2033_4 |
|
||||
| ir.cpp:2034:12:2034:18 | StoreValue | r2034_8 |
|
||||
| ir.cpp:2034:12:2034:18 | Unary | r2034_4 |
|
||||
| ir.cpp:2035:3:2035:4 | Address | &:r2035_4 |
|
||||
| ir.cpp:2035:3:2035:8 | ChiPartial | partial:m2035_5 |
|
||||
| ir.cpp:2035:3:2035:8 | ChiTotal | total:m2034_7 |
|
||||
| ir.cpp:2035:4:2035:4 | Address | &:r2035_2 |
|
||||
| ir.cpp:2035:4:2035:4 | Load | m2034_9 |
|
||||
| ir.cpp:2035:4:2035:4 | Unary | r2035_3 |
|
||||
| ir.cpp:2035:8:2035:8 | StoreValue | r2035_1 |
|
||||
| ir.cpp:2036:3:2036:10 | CallTarget | func:r2036_1 |
|
||||
| ir.cpp:2036:3:2036:10 | ChiPartial | partial:m2036_5 |
|
||||
| ir.cpp:2036:3:2036:10 | ChiTotal | total:m2034_6 |
|
||||
| ir.cpp:2036:3:2036:10 | SideEffect | ~m2034_6 |
|
||||
| ir.cpp:2036:3:2036:10 | Unary | v2036_4 |
|
||||
| ir.cpp:2036:10:2036:10 | Address | &:r2036_2 |
|
||||
| ir.cpp:2036:10:2036:10 | Arg(0) | 0:r2036_3 |
|
||||
| ir.cpp:2036:10:2036:10 | Load | m2034_9 |
|
||||
| ir.cpp:2039:7:2039:7 | Address | &:r2039_5 |
|
||||
| ir.cpp:2039:7:2039:7 | Address | &:r2039_5 |
|
||||
| ir.cpp:2039:7:2039:7 | Address | &:r2039_7 |
|
||||
| ir.cpp:2039:7:2039:7 | Address | &:r2039_7 |
|
||||
| ir.cpp:2039:7:2039:7 | ChiPartial | partial:m2039_3 |
|
||||
| ir.cpp:2039:7:2039:7 | ChiTotal | total:m2039_2 |
|
||||
| ir.cpp:2039:7:2039:7 | Load | m2039_6 |
|
||||
| ir.cpp:2039:7:2039:7 | SideEffect | m2039_3 |
|
||||
| ir.cpp:2039:7:2039:7 | SideEffect | m2039_8 |
|
||||
| ir.cpp:2041:10:2041:24 | ChiPartial | partial:m2041_3 |
|
||||
| ir.cpp:2041:10:2041:24 | ChiTotal | total:m2041_2 |
|
||||
| ir.cpp:2041:10:2041:24 | SideEffect | m2041_3 |
|
||||
| ir.cpp:2041:32:2041:32 | Address | &:r2041_5 |
|
||||
| ir.cpp:2041:32:2041:32 | Address | &:r2041_5 |
|
||||
| ir.cpp:2041:32:2041:32 | Address | &:r2041_7 |
|
||||
| ir.cpp:2041:32:2041:32 | Address | &:r2041_7 |
|
||||
| ir.cpp:2041:32:2041:32 | Load | m2041_6 |
|
||||
| ir.cpp:2041:32:2041:32 | SideEffect | m2041_8 |
|
||||
| ir.cpp:2043:13:2043:18 | Address | &:r2043_5 |
|
||||
| ir.cpp:2043:13:2043:18 | Address | &:r2043_5 |
|
||||
| ir.cpp:2043:13:2043:18 | Address | &:r2043_7 |
|
||||
| ir.cpp:2043:13:2043:18 | Address | &:r2043_7 |
|
||||
| ir.cpp:2043:13:2043:18 | ChiPartial | partial:m2043_3 |
|
||||
| ir.cpp:2043:13:2043:18 | ChiTotal | total:m2043_2 |
|
||||
| ir.cpp:2043:13:2043:18 | Load | m2043_6 |
|
||||
| ir.cpp:2043:13:2043:18 | SideEffect | m2043_3 |
|
||||
| ir.cpp:2043:13:2043:18 | SideEffect | m2043_8 |
|
||||
| ir.cpp:2046:7:2046:7 | Address | &:r2046_5 |
|
||||
| ir.cpp:2046:7:2046:7 | Address | &:r2046_5 |
|
||||
| ir.cpp:2046:7:2046:7 | Address | &:r2046_7 |
|
||||
| ir.cpp:2046:7:2046:7 | Address | &:r2046_7 |
|
||||
| ir.cpp:2046:7:2046:7 | Address | &:r2046_9 |
|
||||
| ir.cpp:2046:7:2046:7 | Arg(this) | this:r2046_9 |
|
||||
| ir.cpp:2046:7:2046:7 | CallTarget | func:r2046_10 |
|
||||
| ir.cpp:2046:7:2046:7 | ChiPartial | partial:m2046_3 |
|
||||
| ir.cpp:2046:7:2046:7 | ChiPartial | partial:m2046_12 |
|
||||
| ir.cpp:2046:7:2046:7 | ChiPartial | partial:m2046_14 |
|
||||
| ir.cpp:2046:7:2046:7 | ChiTotal | total:m2046_2 |
|
||||
| ir.cpp:2046:7:2046:7 | ChiTotal | total:m2046_4 |
|
||||
| ir.cpp:2046:7:2046:7 | ChiTotal | total:m2046_8 |
|
||||
| ir.cpp:2046:7:2046:7 | Load | m2046_6 |
|
||||
| ir.cpp:2046:7:2046:7 | SideEffect | m2046_15 |
|
||||
| ir.cpp:2046:7:2046:7 | SideEffect | ~m2046_4 |
|
||||
| ir.cpp:2046:7:2046:7 | SideEffect | ~m2046_13 |
|
||||
| ir.cpp:2046:7:2046:7 | Unary | m2046_6 |
|
||||
| ir.cpp:2049:5:2049:13 | Address | &:r2049_5 |
|
||||
| ir.cpp:2049:5:2049:13 | Address | &:r2049_5 |
|
||||
| ir.cpp:2049:5:2049:13 | Address | &:r2049_7 |
|
||||
| ir.cpp:2049:5:2049:13 | Address | &:r2049_7 |
|
||||
| ir.cpp:2049:5:2049:13 | ChiPartial | partial:m2049_3 |
|
||||
| ir.cpp:2049:5:2049:13 | ChiTotal | total:m2049_2 |
|
||||
| ir.cpp:2049:5:2049:13 | Load | m2049_6 |
|
||||
| ir.cpp:2049:5:2049:13 | SideEffect | m2049_8 |
|
||||
| ir.cpp:2049:5:2049:13 | SideEffect | ~m2049_14 |
|
||||
| ir.cpp:2049:5:2049:13 | Unary | m2049_6 |
|
||||
| ir.cpp:2049:18:2049:18 | Arg(this) | this:r2049_10 |
|
||||
| ir.cpp:2049:18:2049:18 | CallTarget | func:r2049_11 |
|
||||
| ir.cpp:2049:18:2049:18 | ChiPartial | partial:m2049_13 |
|
||||
| ir.cpp:2049:18:2049:18 | ChiTotal | total:m2049_4 |
|
||||
| ir.cpp:2049:18:2049:18 | SideEffect | ~m2049_4 |
|
||||
| ir.cpp:2051:10:2051:24 | ChiPartial | partial:m2051_3 |
|
||||
| ir.cpp:2051:10:2051:24 | ChiTotal | total:m2051_2 |
|
||||
| ir.cpp:2051:10:2051:24 | SideEffect | m2051_3 |
|
||||
| ir.cpp:2051:32:2051:32 | Address | &:r2051_5 |
|
||||
| ir.cpp:2051:32:2051:32 | Address | &:r2051_5 |
|
||||
| ir.cpp:2051:32:2051:32 | Address | &:r2051_7 |
|
||||
| ir.cpp:2051:32:2051:32 | Address | &:r2051_7 |
|
||||
| ir.cpp:2051:32:2051:32 | Load | m2051_6 |
|
||||
| ir.cpp:2051:32:2051:32 | SideEffect | m2051_8 |
|
||||
| ir.cpp:2056:5:2056:18 | ChiPartial | partial:m2056_3 |
|
||||
| ir.cpp:2056:5:2056:18 | ChiTotal | total:m2056_2 |
|
||||
| ir.cpp:2058:12:2058:13 | Address | &:r2058_1 |
|
||||
| ir.cpp:2058:17:2058:27 | Address | &:r2058_4 |
|
||||
| ir.cpp:2058:17:2058:27 | Address | &:r2058_8 |
|
||||
| ir.cpp:2058:17:2058:27 | Arg(0) | 0:r2058_3 |
|
||||
| ir.cpp:2058:17:2058:27 | Arg(this) | this:r2058_8 |
|
||||
| ir.cpp:2058:17:2058:27 | CallTarget | func:r2058_2 |
|
||||
| ir.cpp:2058:17:2058:27 | CallTarget | func:r2058_9 |
|
||||
| ir.cpp:2058:17:2058:27 | ChiPartial | partial:m2058_5 |
|
||||
| ir.cpp:2058:17:2058:27 | ChiPartial | partial:m2058_11 |
|
||||
| ir.cpp:2058:17:2058:27 | ChiPartial | partial:m2058_13 |
|
||||
| ir.cpp:2058:17:2058:27 | ChiTotal | total:m2056_4 |
|
||||
| ir.cpp:2058:17:2058:27 | ChiTotal | total:m2058_6 |
|
||||
| ir.cpp:2058:17:2058:27 | ChiTotal | total:m2058_7 |
|
||||
| ir.cpp:2058:17:2058:27 | SideEffect | ~m2056_4 |
|
||||
| ir.cpp:2058:17:2058:27 | SideEffect | ~m2058_6 |
|
||||
| ir.cpp:2058:17:2058:27 | StoreValue | r2058_8 |
|
||||
| ir.cpp:2058:17:2058:27 | Unary | r2058_4 |
|
||||
| ir.cpp:2059:5:2059:13 | CallTarget | func:r2059_1 |
|
||||
| ir.cpp:2059:5:2059:13 | ChiPartial | partial:m2059_5 |
|
||||
| ir.cpp:2059:5:2059:13 | ChiTotal | total:m2058_12 |
|
||||
| ir.cpp:2059:5:2059:13 | SideEffect | ~m2058_12 |
|
||||
| ir.cpp:2059:5:2059:13 | Unary | v2059_4 |
|
||||
| ir.cpp:2059:12:2059:13 | Address | &:r2059_2 |
|
||||
| ir.cpp:2059:12:2059:13 | Arg(0) | 0:r2059_3 |
|
||||
| ir.cpp:2059:12:2059:13 | Load | m2058_15 |
|
||||
| ir.cpp:2061:12:2061:13 | Address | &:r2061_1 |
|
||||
| ir.cpp:2061:17:2061:30 | Address | &:r2061_4 |
|
||||
| ir.cpp:2061:17:2061:30 | Address | &:r2061_8 |
|
||||
| ir.cpp:2061:17:2061:30 | Arg(0) | 0:r2061_3 |
|
||||
| ir.cpp:2061:17:2061:30 | Arg(this) | this:r2061_8 |
|
||||
| ir.cpp:2061:17:2061:30 | CallTarget | func:r2061_2 |
|
||||
| ir.cpp:2061:17:2061:30 | CallTarget | func:r2061_9 |
|
||||
| ir.cpp:2061:17:2061:30 | ChiPartial | partial:m2061_5 |
|
||||
| ir.cpp:2061:17:2061:30 | ChiPartial | partial:m2061_11 |
|
||||
| ir.cpp:2061:17:2061:30 | ChiPartial | partial:m2061_13 |
|
||||
| ir.cpp:2061:17:2061:30 | ChiTotal | total:m2059_6 |
|
||||
| ir.cpp:2061:17:2061:30 | ChiTotal | total:m2061_6 |
|
||||
| ir.cpp:2061:17:2061:30 | ChiTotal | total:m2061_7 |
|
||||
| ir.cpp:2061:17:2061:30 | SideEffect | ~m2059_6 |
|
||||
| ir.cpp:2061:17:2061:30 | SideEffect | ~m2061_6 |
|
||||
| ir.cpp:2061:17:2061:30 | StoreValue | r2061_15 |
|
||||
| ir.cpp:2061:17:2061:30 | Unary | r2061_4 |
|
||||
| ir.cpp:2061:17:2061:30 | Unary | r2061_8 |
|
||||
| ir.cpp:2062:5:2062:13 | CallTarget | func:r2062_1 |
|
||||
| ir.cpp:2062:5:2062:13 | ChiPartial | partial:m2062_5 |
|
||||
| ir.cpp:2062:5:2062:13 | ChiTotal | total:m2061_12 |
|
||||
| ir.cpp:2062:5:2062:13 | SideEffect | ~m2061_12 |
|
||||
| ir.cpp:2062:5:2062:13 | Unary | v2062_4 |
|
||||
| ir.cpp:2062:12:2062:13 | Address | &:r2062_2 |
|
||||
| ir.cpp:2062:12:2062:13 | Arg(0) | 0:r2062_3 |
|
||||
| ir.cpp:2062:12:2062:13 | Load | m2061_16 |
|
||||
| ir.cpp:2064:15:2064:15 | Address | &:r2064_1 |
|
||||
| ir.cpp:2064:19:2064:32 | Address | &:r2064_4 |
|
||||
| ir.cpp:2064:19:2064:32 | Address | &:r2064_8 |
|
||||
| ir.cpp:2064:19:2064:32 | Arg(0) | 0:r2064_3 |
|
||||
| ir.cpp:2064:19:2064:32 | Arg(this) | this:r2064_8 |
|
||||
| ir.cpp:2064:19:2064:32 | CallTarget | func:r2064_2 |
|
||||
| ir.cpp:2064:19:2064:32 | CallTarget | func:r2064_9 |
|
||||
| ir.cpp:2064:19:2064:32 | ChiPartial | partial:m2064_5 |
|
||||
| ir.cpp:2064:19:2064:32 | ChiPartial | partial:m2064_11 |
|
||||
| ir.cpp:2064:19:2064:32 | ChiPartial | partial:m2064_13 |
|
||||
| ir.cpp:2064:19:2064:32 | ChiTotal | total:m2062_6 |
|
||||
| ir.cpp:2064:19:2064:32 | ChiTotal | total:m2064_6 |
|
||||
| ir.cpp:2064:19:2064:32 | ChiTotal | total:m2064_7 |
|
||||
| ir.cpp:2064:19:2064:32 | SideEffect | ~m2062_6 |
|
||||
| ir.cpp:2064:19:2064:32 | SideEffect | ~m2064_6 |
|
||||
| ir.cpp:2064:19:2064:32 | StoreValue | r2064_8 |
|
||||
| ir.cpp:2064:19:2064:32 | Unary | r2064_4 |
|
||||
| ir.cpp:2065:5:2065:12 | CallTarget | func:r2065_1 |
|
||||
| ir.cpp:2065:5:2065:12 | ChiPartial | partial:m2065_5 |
|
||||
| ir.cpp:2065:5:2065:12 | ChiTotal | total:m2064_12 |
|
||||
| ir.cpp:2065:5:2065:12 | SideEffect | ~m2064_12 |
|
||||
| ir.cpp:2065:5:2065:12 | Unary | v2065_4 |
|
||||
| ir.cpp:2065:12:2065:12 | Address | &:r2065_2 |
|
||||
| ir.cpp:2065:12:2065:12 | Arg(0) | 0:r2065_3 |
|
||||
| ir.cpp:2065:12:2065:12 | Load | m2064_15 |
|
||||
| perf-regression.cpp:6:3:6:5 | Address | &:r6_5 |
|
||||
| perf-regression.cpp:6:3:6:5 | Address | &:r6_5 |
|
||||
| perf-regression.cpp:6:3:6:5 | Address | &:r6_7 |
|
||||
|
||||
@@ -5686,7 +5686,7 @@ ir.cpp:
|
||||
# 1019| v1019_3(void) = Call[operator delete] : func:r1019_1, 0:r1019_2
|
||||
# 1019| mu1019_4(unknown) = ^CallSideEffect : ~m?
|
||||
# 1019| v1019_5(void) = Convert : v1019_3
|
||||
# 1020| r1020_1(glval<unknown>) = FunctionAddress :
|
||||
# 1020| r1020_1(glval<unknown>) = VirtualDeleteFunctionAddress :
|
||||
# 1020| r1020_2(PolymorphicBase *) = Constant[0] :
|
||||
# 1020| v1020_3(void) = Call[?] : func:r1020_1, 0:r1020_2
|
||||
# 1020| mu1020_4(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -11121,6 +11121,202 @@ ir.cpp:
|
||||
# 2028| mu2028_13(unsigned int) = Store[#temp2028:7] : &:r2028_12, r2030_8
|
||||
#-----| Goto -> Block 2
|
||||
|
||||
# 2033| void NewDeleteMem()
|
||||
# 2033| Block 0
|
||||
# 2033| v2033_1(void) = EnterFunction :
|
||||
# 2033| mu2033_2(unknown) = AliasedDefinition :
|
||||
# 2033| mu2033_3(unknown) = InitializeNonLocal :
|
||||
# 2034| r2034_1(glval<int *>) = VariableAddress[x] :
|
||||
# 2034| r2034_2(glval<unknown>) = FunctionAddress[operator new] :
|
||||
# 2034| r2034_3(unsigned long) = Constant[4] :
|
||||
# 2034| r2034_4(void *) = Call[operator new] : func:r2034_2, 0:r2034_3
|
||||
# 2034| mu2034_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2034| mu2034_6(unknown) = ^InitializeDynamicAllocation : &:r2034_4
|
||||
# 2034| r2034_7(int *) = Convert : r2034_4
|
||||
# 2034| mu2034_8(int *) = Store[x] : &:r2034_1, r2034_7
|
||||
# 2035| r2035_1(int) = Constant[6] :
|
||||
# 2035| r2035_2(glval<int *>) = VariableAddress[x] :
|
||||
# 2035| r2035_3(int *) = Load[x] : &:r2035_2, ~m?
|
||||
# 2035| r2035_4(glval<int>) = CopyValue : r2035_3
|
||||
# 2035| mu2035_5(int) = Store[?] : &:r2035_4, r2035_1
|
||||
# 2036| r2036_1(glval<unknown>) = FunctionAddress[operator delete] :
|
||||
# 2036| r2036_2(glval<int *>) = VariableAddress[x] :
|
||||
# 2036| r2036_3(int *) = Load[x] : &:r2036_2, ~m?
|
||||
# 2036| v2036_4(void) = Call[operator delete] : func:r2036_1, 0:r2036_3
|
||||
# 2036| mu2036_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2036| v2036_6(void) = Convert : v2036_4
|
||||
# 2037| v2037_1(void) = NoOp :
|
||||
# 2033| v2033_4(void) = ReturnVoid :
|
||||
# 2033| v2033_5(void) = AliasedUse : ~m?
|
||||
# 2033| v2033_6(void) = ExitFunction :
|
||||
|
||||
# 2039| void Base2::Base2()
|
||||
# 2039| Block 0
|
||||
# 2039| v2039_1(void) = EnterFunction :
|
||||
# 2039| mu2039_2(unknown) = AliasedDefinition :
|
||||
# 2039| mu2039_3(unknown) = InitializeNonLocal :
|
||||
# 2039| r2039_4(glval<unknown>) = VariableAddress[#this] :
|
||||
# 2039| mu2039_5(glval<Base2>) = InitializeParameter[#this] : &:r2039_4
|
||||
# 2039| r2039_6(glval<Base2>) = Load[#this] : &:r2039_4, ~m?
|
||||
# 2039| mu2039_7(Base2) = InitializeIndirection[#this] : &:r2039_6
|
||||
# 2039| v2039_8(void) = NoOp :
|
||||
# 2039| v2039_9(void) = ReturnIndirection[#this] : &:r2039_6, ~m?
|
||||
# 2039| v2039_10(void) = ReturnVoid :
|
||||
# 2039| v2039_11(void) = AliasedUse : ~m?
|
||||
# 2039| v2039_12(void) = ExitFunction :
|
||||
|
||||
# 2041| void Base2::operator delete(void*)
|
||||
# 2041| Block 0
|
||||
# 2041| v2041_1(void) = EnterFunction :
|
||||
# 2041| mu2041_2(unknown) = AliasedDefinition :
|
||||
# 2041| mu2041_3(unknown) = InitializeNonLocal :
|
||||
# 2041| r2041_4(glval<void *>) = VariableAddress[p] :
|
||||
# 2041| mu2041_5(void *) = InitializeParameter[p] : &:r2041_4
|
||||
# 2041| r2041_6(void *) = Load[p] : &:r2041_4, ~m?
|
||||
# 2041| mu2041_7(unknown) = InitializeIndirection[p] : &:r2041_6
|
||||
# 2042| v2042_1(void) = NoOp :
|
||||
# 2041| v2041_8(void) = ReturnIndirection[p] : &:r2041_6, ~m?
|
||||
# 2041| v2041_9(void) = ReturnVoid :
|
||||
# 2041| v2041_10(void) = AliasedUse : ~m?
|
||||
# 2041| v2041_11(void) = ExitFunction :
|
||||
|
||||
# 2043| void Base2::~Base2()
|
||||
# 2043| Block 0
|
||||
# 2043| v2043_1(void) = EnterFunction :
|
||||
# 2043| mu2043_2(unknown) = AliasedDefinition :
|
||||
# 2043| mu2043_3(unknown) = InitializeNonLocal :
|
||||
# 2043| r2043_4(glval<unknown>) = VariableAddress[#this] :
|
||||
# 2043| mu2043_5(glval<Base2>) = InitializeParameter[#this] : &:r2043_4
|
||||
# 2043| r2043_6(glval<Base2>) = Load[#this] : &:r2043_4, ~m?
|
||||
# 2043| mu2043_7(Base2) = InitializeIndirection[#this] : &:r2043_6
|
||||
# 2043| v2043_8(void) = NoOp :
|
||||
# 2043| v2043_9(void) = ReturnIndirection[#this] : &:r2043_6, ~m?
|
||||
# 2043| v2043_10(void) = ReturnVoid :
|
||||
# 2043| v2043_11(void) = AliasedUse : ~m?
|
||||
# 2043| v2043_12(void) = ExitFunction :
|
||||
|
||||
# 2046| void Derived2::Derived2()
|
||||
# 2046| Block 0
|
||||
# 2046| v2046_1(void) = EnterFunction :
|
||||
# 2046| mu2046_2(unknown) = AliasedDefinition :
|
||||
# 2046| mu2046_3(unknown) = InitializeNonLocal :
|
||||
# 2046| r2046_4(glval<unknown>) = VariableAddress[#this] :
|
||||
# 2046| mu2046_5(glval<Derived2>) = InitializeParameter[#this] : &:r2046_4
|
||||
# 2046| r2046_6(glval<Derived2>) = Load[#this] : &:r2046_4, ~m?
|
||||
# 2046| mu2046_7(Derived2) = InitializeIndirection[#this] : &:r2046_6
|
||||
# 2046| r2046_8(glval<Base2>) = ConvertToNonVirtualBase[Derived2 : Base2] : mu2046_5
|
||||
# 2046| r2046_9(glval<unknown>) = FunctionAddress[Base2] :
|
||||
# 2046| v2046_10(void) = Call[Base2] : func:r2046_9, this:r2046_8
|
||||
# 2046| mu2046_11(unknown) = ^CallSideEffect : ~m?
|
||||
# 2046| mu2046_12(Base2) = ^IndirectMayWriteSideEffect[-1] : &:r2046_8
|
||||
# 2046| v2046_13(void) = NoOp :
|
||||
# 2046| v2046_14(void) = ReturnIndirection[#this] : &:r2046_6, ~m?
|
||||
# 2046| v2046_15(void) = ReturnVoid :
|
||||
# 2046| v2046_16(void) = AliasedUse : ~m?
|
||||
# 2046| v2046_17(void) = ExitFunction :
|
||||
|
||||
# 2049| void Derived2::~Derived2()
|
||||
# 2049| Block 0
|
||||
# 2049| v2049_1(void) = EnterFunction :
|
||||
# 2049| mu2049_2(unknown) = AliasedDefinition :
|
||||
# 2049| mu2049_3(unknown) = InitializeNonLocal :
|
||||
# 2049| r2049_4(glval<unknown>) = VariableAddress[#this] :
|
||||
# 2049| mu2049_5(glval<Derived2>) = InitializeParameter[#this] : &:r2049_4
|
||||
# 2049| r2049_6(glval<Derived2>) = Load[#this] : &:r2049_4, ~m?
|
||||
# 2049| mu2049_7(Derived2) = InitializeIndirection[#this] : &:r2049_6
|
||||
# 2049| v2049_8(void) = NoOp :
|
||||
# 2049| r2049_9(glval<Base2>) = ConvertToNonVirtualBase[Derived2 : Base2] : mu2049_5
|
||||
# 2049| r2049_10(glval<unknown>) = FunctionAddress[~Base2] :
|
||||
# 2049| v2049_11(void) = Call[~Base2] : func:r2049_10, this:r2049_9
|
||||
# 2049| mu2049_12(unknown) = ^CallSideEffect : ~m?
|
||||
# 2049| v2049_13(void) = ReturnIndirection[#this] : &:r2049_6, ~m?
|
||||
# 2049| v2049_14(void) = ReturnVoid :
|
||||
# 2049| v2049_15(void) = AliasedUse : ~m?
|
||||
# 2049| v2049_16(void) = ExitFunction :
|
||||
|
||||
# 2051| void Derived2::operator delete(void*)
|
||||
# 2051| Block 0
|
||||
# 2051| v2051_1(void) = EnterFunction :
|
||||
# 2051| mu2051_2(unknown) = AliasedDefinition :
|
||||
# 2051| mu2051_3(unknown) = InitializeNonLocal :
|
||||
# 2051| r2051_4(glval<void *>) = VariableAddress[p] :
|
||||
# 2051| mu2051_5(void *) = InitializeParameter[p] : &:r2051_4
|
||||
# 2051| r2051_6(void *) = Load[p] : &:r2051_4, ~m?
|
||||
# 2051| mu2051_7(unknown) = InitializeIndirection[p] : &:r2051_6
|
||||
# 2052| v2052_1(void) = NoOp :
|
||||
# 2051| v2051_8(void) = ReturnIndirection[p] : &:r2051_6, ~m?
|
||||
# 2051| v2051_9(void) = ReturnVoid :
|
||||
# 2051| v2051_10(void) = AliasedUse : ~m?
|
||||
# 2051| v2051_11(void) = ExitFunction :
|
||||
|
||||
# 2056| int virtual_delete()
|
||||
# 2056| Block 0
|
||||
# 2056| v2056_1(void) = EnterFunction :
|
||||
# 2056| mu2056_2(unknown) = AliasedDefinition :
|
||||
# 2056| mu2056_3(unknown) = InitializeNonLocal :
|
||||
# 2058| r2058_1(glval<Base2 *>) = VariableAddress[b1] :
|
||||
# 2058| r2058_2(glval<unknown>) = FunctionAddress[operator new] :
|
||||
# 2058| r2058_3(unsigned long) = Constant[8] :
|
||||
# 2058| r2058_4(void *) = Call[operator new] : func:r2058_2, 0:r2058_3
|
||||
# 2058| mu2058_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2058| mu2058_6(unknown) = ^InitializeDynamicAllocation : &:r2058_4
|
||||
# 2058| r2058_7(Base2 *) = Convert : r2058_4
|
||||
# 2058| r2058_8(glval<unknown>) = FunctionAddress[Base2] :
|
||||
# 2058| v2058_9(void) = Call[Base2] : func:r2058_8, this:r2058_7
|
||||
# 2058| mu2058_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 2058| mu2058_11(Base2) = ^IndirectMayWriteSideEffect[-1] : &:r2058_7
|
||||
# 2058| mu2058_12(Base2 *) = Store[b1] : &:r2058_1, r2058_7
|
||||
# 2059| r2059_1(glval<unknown>) = VirtualDeleteFunctionAddress :
|
||||
# 2059| r2059_2(glval<Base2 *>) = VariableAddress[b1] :
|
||||
# 2059| r2059_3(Base2 *) = Load[b1] : &:r2059_2, ~m?
|
||||
# 2059| v2059_4(void) = Call[?] : func:r2059_1, 0:r2059_3
|
||||
# 2059| mu2059_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2059| v2059_6(void) = Convert : v2059_4
|
||||
# 2061| r2061_1(glval<Base2 *>) = VariableAddress[b2] :
|
||||
# 2061| r2061_2(glval<unknown>) = FunctionAddress[operator new] :
|
||||
# 2061| r2061_3(unsigned long) = Constant[16] :
|
||||
# 2061| r2061_4(void *) = Call[operator new] : func:r2061_2, 0:r2061_3
|
||||
# 2061| mu2061_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2061| mu2061_6(unknown) = ^InitializeDynamicAllocation : &:r2061_4
|
||||
# 2061| r2061_7(Derived2 *) = Convert : r2061_4
|
||||
# 2061| r2061_8(glval<unknown>) = FunctionAddress[Derived2] :
|
||||
# 2061| v2061_9(void) = Call[Derived2] : func:r2061_8, this:r2061_7
|
||||
# 2061| mu2061_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 2061| mu2061_11(Derived2) = ^IndirectMayWriteSideEffect[-1] : &:r2061_7
|
||||
# 2061| r2061_12(Base2 *) = ConvertToNonVirtualBase[Derived2 : Base2] : r2061_7
|
||||
# 2061| mu2061_13(Base2 *) = Store[b2] : &:r2061_1, r2061_12
|
||||
# 2062| r2062_1(glval<unknown>) = VirtualDeleteFunctionAddress :
|
||||
# 2062| r2062_2(glval<Base2 *>) = VariableAddress[b2] :
|
||||
# 2062| r2062_3(Base2 *) = Load[b2] : &:r2062_2, ~m?
|
||||
# 2062| v2062_4(void) = Call[?] : func:r2062_1, 0:r2062_3
|
||||
# 2062| mu2062_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2062| v2062_6(void) = Convert : v2062_4
|
||||
# 2064| r2064_1(glval<Derived2 *>) = VariableAddress[d] :
|
||||
# 2064| r2064_2(glval<unknown>) = FunctionAddress[operator new] :
|
||||
# 2064| r2064_3(unsigned long) = Constant[16] :
|
||||
# 2064| r2064_4(void *) = Call[operator new] : func:r2064_2, 0:r2064_3
|
||||
# 2064| mu2064_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2064| mu2064_6(unknown) = ^InitializeDynamicAllocation : &:r2064_4
|
||||
# 2064| r2064_7(Derived2 *) = Convert : r2064_4
|
||||
# 2064| r2064_8(glval<unknown>) = FunctionAddress[Derived2] :
|
||||
# 2064| v2064_9(void) = Call[Derived2] : func:r2064_8, this:r2064_7
|
||||
# 2064| mu2064_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 2064| mu2064_11(Derived2) = ^IndirectMayWriteSideEffect[-1] : &:r2064_7
|
||||
# 2064| mu2064_12(Derived2 *) = Store[d] : &:r2064_1, r2064_7
|
||||
# 2065| r2065_1(glval<unknown>) = VirtualDeleteFunctionAddress :
|
||||
# 2065| r2065_2(glval<Derived2 *>) = VariableAddress[d] :
|
||||
# 2065| r2065_3(Derived2 *) = Load[d] : &:r2065_2, ~m?
|
||||
# 2065| v2065_4(void) = Call[?] : func:r2065_1, 0:r2065_3
|
||||
# 2065| mu2065_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2065| v2065_6(void) = Convert : v2065_4
|
||||
# 2066| v2066_1(void) = Unreached :
|
||||
|
||||
# 2056| Block 1
|
||||
# 2056| r2056_4(glval<int>) = VariableAddress[#return] :
|
||||
# 2056| v2056_5(void) = ReturnValue : &:r2056_4, ~m?
|
||||
# 2056| v2056_6(void) = AliasedUse : ~m?
|
||||
# 2056| v2056_7(void) = ExitFunction :
|
||||
|
||||
perf-regression.cpp:
|
||||
# 6| void Big::Big()
|
||||
# 6| Block 0
|
||||
|
||||
@@ -29,6 +29,8 @@ edges
|
||||
| test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a |
|
||||
| test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a |
|
||||
| test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a |
|
||||
| test_free.cpp:252:7:252:7 | p | test_free.cpp:255:10:255:10 | p |
|
||||
| test_free.cpp:260:9:260:9 | p | test_free.cpp:263:12:263:12 | p |
|
||||
nodes
|
||||
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
|
||||
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
|
||||
@@ -66,6 +68,10 @@ nodes
|
||||
| test_free.cpp:207:10:207:10 | a | semmle.label | a |
|
||||
| test_free.cpp:209:10:209:10 | a | semmle.label | a |
|
||||
| test_free.cpp:209:10:209:10 | a | semmle.label | a |
|
||||
| test_free.cpp:252:7:252:7 | p | semmle.label | p |
|
||||
| test_free.cpp:255:10:255:10 | p | semmle.label | p |
|
||||
| test_free.cpp:260:9:260:9 | p | semmle.label | p |
|
||||
| test_free.cpp:263:12:263:12 | p | semmle.label | p |
|
||||
subpaths
|
||||
#select
|
||||
| test_free.cpp:14:10:14:10 | a | test_free.cpp:11:10:11:10 | a | test_free.cpp:14:10:14:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
|
||||
@@ -98,3 +104,5 @@ subpaths
|
||||
| test_free.cpp:209:10:209:10 | a | test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:207:5:207:8 | call to free | call to free |
|
||||
| test_free.cpp:209:10:209:10 | a | test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:207:5:207:8 | call to free | call to free |
|
||||
| test_free.cpp:209:10:209:10 | a | test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:207:5:207:8 | call to free | call to free |
|
||||
| test_free.cpp:255:10:255:10 | p | test_free.cpp:252:7:252:7 | p | test_free.cpp:255:10:255:10 | p | Memory pointed to by 'p' may already have been freed by $@. | test_free.cpp:252:2:252:5 | call to free | call to free |
|
||||
| test_free.cpp:263:12:263:12 | p | test_free.cpp:260:9:260:9 | p | test_free.cpp:263:12:263:12 | p | Memory pointed to by 'p' may already have been freed by $@. | test_free.cpp:260:2:260:9 | delete | delete |
|
||||
|
||||
@@ -92,6 +92,10 @@
|
||||
| test_free.cpp:233:14:233:15 | * ... |
|
||||
| test_free.cpp:239:14:239:15 | * ... |
|
||||
| test_free.cpp:245:10:245:11 | * ... |
|
||||
| test_free.cpp:252:7:252:7 | p |
|
||||
| test_free.cpp:255:10:255:10 | p |
|
||||
| test_free.cpp:260:9:260:9 | p |
|
||||
| test_free.cpp:263:12:263:12 | p |
|
||||
| virtual.cpp:18:10:18:10 | a |
|
||||
| virtual.cpp:19:10:19:10 | c |
|
||||
| virtual.cpp:38:10:38:10 | b |
|
||||
|
||||
@@ -12,3 +12,5 @@
|
||||
| test.cpp:157:3:157:26 | new[] | This memory is never freed. |
|
||||
| test.cpp:169:14:169:19 | call to strdup | This memory is never freed. |
|
||||
| test_free.cpp:167:15:167:21 | call to realloc | This memory is never freed. |
|
||||
| test_free.cpp:253:14:253:19 | call to malloc | This memory is never freed. |
|
||||
| test_free.cpp:261:6:261:12 | new | This memory is never freed. |
|
||||
|
||||
@@ -28,6 +28,8 @@ edges
|
||||
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
|
||||
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
|
||||
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
|
||||
| test_free.cpp:252:7:252:7 | p | test_free.cpp:254:6:254:6 | p |
|
||||
| test_free.cpp:260:9:260:9 | p | test_free.cpp:262:6:262:6 | p |
|
||||
nodes
|
||||
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
|
||||
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
|
||||
@@ -66,6 +68,10 @@ nodes
|
||||
| test_free.cpp:245:10:245:11 | * ... | semmle.label | * ... |
|
||||
| test_free.cpp:246:9:246:10 | * ... | semmle.label | * ... |
|
||||
| test_free.cpp:246:9:246:10 | * ... | semmle.label | * ... |
|
||||
| test_free.cpp:252:7:252:7 | p | semmle.label | p |
|
||||
| test_free.cpp:254:6:254:6 | p | semmle.label | p |
|
||||
| test_free.cpp:260:9:260:9 | p | semmle.label | p |
|
||||
| test_free.cpp:262:6:262:6 | p | semmle.label | p |
|
||||
subpaths
|
||||
#select
|
||||
| test_free.cpp:12:5:12:5 | a | test_free.cpp:11:10:11:10 | a | test_free.cpp:12:5:12:5 | a | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
|
||||
@@ -97,3 +103,5 @@ subpaths
|
||||
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |
|
||||
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |
|
||||
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |
|
||||
| test_free.cpp:254:6:254:6 | p | test_free.cpp:252:7:252:7 | p | test_free.cpp:254:6:254:6 | p | Memory may have been previously freed by $@. | test_free.cpp:252:2:252:5 | call to free | call to free |
|
||||
| test_free.cpp:262:6:262:6 | p | test_free.cpp:260:9:260:9 | p | test_free.cpp:262:6:262:6 | p | Memory may have been previously freed by $@. | test_free.cpp:260:2:260:9 | delete | delete |
|
||||
|
||||
@@ -244,4 +244,21 @@ void test_loop3(char ** a, char ** b) {
|
||||
void test_deref(char **a) {
|
||||
free(*a);
|
||||
use(*a); // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
|
||||
// Refs
|
||||
|
||||
void test_ref(char *&p) {
|
||||
free(p);
|
||||
p = (char *)malloc(sizeof(char)*10);
|
||||
use(p); // GOOD [FALSE POSITIVE]
|
||||
free(p); // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
|
||||
|
||||
void test_ref_delete(int *&p) {
|
||||
delete p;
|
||||
p = new int;
|
||||
use(p); // GOOD [FALSE POSITIVE]
|
||||
delete p; // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
Reference in New Issue
Block a user