Summary: `bufferoverrun` is not part of `checkers` yet so bufferoverrun tests require their own Makefile Reviewed By: jvillard Differential Revision: D4937558 fbshipit-source-id: 20380f1master
parent
20aff78b36
commit
d20d71da50
@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2016 - present Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
TESTS_DIR = ../../..
|
||||
|
||||
ANALYZER = bufferoverrun
|
||||
# see explanations in cpp/errors/Makefile for the custom isystem
|
||||
CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
|
||||
INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed
|
||||
INFERPRINT_OPTIONS = --issues-tests
|
||||
|
||||
SOURCES = \
|
||||
trivial.cpp \
|
||||
vector.cpp \
|
||||
|
||||
HEADERS =
|
||||
|
||||
include $(TESTS_DIR)/clang.make
|
||||
|
||||
infer-out/report.json: $(MAKEFILE_LIST)
|
@ -0,0 +1 @@
|
||||
codetoanalyze/cpp/bufferoverrun/trivial.cpp, trivial, 2, BUFFER_OVERRUN, [Offset : [10, 10] Size : [10, 10] @ codetoanalyze/cpp/bufferoverrun/trivial.cpp:15:3]
|
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2016 - present
|
||||
*
|
||||
* Programming Research Laboratory (ROPAS)
|
||||
* Seoul National University, Korea
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
void trivial() {
|
||||
int a[10];
|
||||
a[10] = 0; /* BUG */
|
||||
}
|
Loading…
Reference in new issue