c14223fb22
libfdt is never supposed to access memory outside the the blob, or outside the sub-blocks within it, even if the blob is badly corrupted. We can leverage valgrind's client requests to do better testing of this. This adds a vg_prepare_blob() function which marks just the valid parts of an fdt blob as properly initialized, explicitly marking the rest as uninitialized. This means valgrind should catch any bad accesses. We add a call to vg_prepare_blob() to load_blob() so that lots of the existing testcases will benefit from the extra checking. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
35 lines
890 B
YAML
35 lines
890 B
YAML
language: c
|
|
|
|
# Coverity Scan uploads
|
|
env:
|
|
global:
|
|
# COVERITY_SCAN_TOKEN (dgibson/dtc)
|
|
- secure: "vlHvXe618//IM9LQaKzqsrUbjs7ng0L9UCST4kJbJnFQDXvVe5JiSmJGd4ef7mm0NUv5bMRl2W3xCiu6BYAu/NvU3tMNHoLG+JgCJs0+wLJXbWOwji/NmH7olqgJG+CmpaCMXjARF6+nrTnBYHJL6cYyf4KVoV4B0I/hLUW91+s="
|
|
|
|
matrix:
|
|
include:
|
|
- addons:
|
|
apt:
|
|
packages:
|
|
- swig
|
|
- python-dev
|
|
- valgrind
|
|
coverity_scan:
|
|
project:
|
|
name: dtc
|
|
description: Device Tree Compiler
|
|
notification_email: david@gibson.dropbear.id.au
|
|
build_command: make
|
|
branch_pattern: coverity_scan
|
|
script:
|
|
- make
|
|
- make check && make checkm
|
|
|
|
# Check it builds properly without the python bits
|
|
- addons:
|
|
apt:
|
|
packages:
|
|
- valgrind
|
|
script:
|
|
- make
|
|
- make check
|