-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Description
Affected rules
M0-1-3
Description
Similar to, but for global/namespace/member variables:
5ecee7e
Example
#include <cstdio>
template <int t>
class CharBuffer
{
public:
int member[t];
CharBuffer():member{0}{}
};
constexpr int line_length = 1024U;
int foo()
{
CharBuffer<line_length> buffer{};
constexpr std::size_t max_stack_size_usage = 64 * 1024;
static_assert(
(sizeof(buffer) + sizeof(line_length)) <= max_stack_size_usage,
"assert");
return buffer.member[0];
}
Metadata
Metadata
Assignees
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Projects
Status
Done