debian/0000755000000000000000000000000012474371766007207 5ustar debian/control0000644000000000000000000000246612372436176010614 0ustar Source: creduce Section: devel Priority: extra Maintainer: Debian GCC Maintainers Uploaders: Matthias Klose Build-Depends: debhelper (>= 8.0.0), autotools-dev, flex, libedit-dev, zlib1g-dev, llvm-3.5-dev, libclang-3.5-dev, clang-3.5, clang-format-3.5, libbenchmark-timer-perl, libsys-cpu-perl, libfile-which-perl, libregexp-common-perl, libexporter-lite-perl, libgetopt-tabular-perl, indent, astyle, delta, # for running the tests: frama-c-base, # wrong kcc, https://code.google.com/p/c-semantics/ is needed Build-Conflicts: kcc Standards-Version: 3.9.5 Homepage: http://embed.cs.utah.edu/creduce/ Package: creduce Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, clang-format-3.5, libbenchmark-timer-perl, libsys-cpu-perl, libfile-which-perl, libregexp-common-perl, libexporter-lite-perl, libgetopt-tabular-perl, indent, astyle, delta Recommends: gcc | clang Description: Test-Case Reduction for C Compiler Bugs C-Reduce is a tool which takes a large C or C++ program that has a property of interest (such as triggering a compiler bug) and automatically produces a much smaller C/C++ program that has the same property. It is intended for use by people who discover and report bugs in compilers and other tools that process C/C++ code. debian/rules0000755000000000000000000000116012372436657010263 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) CLANG_V = 3.5 CLANG = clang-$(CLANG_V) GCC = gcc %: dh $@ --with autotools-dev --parallel override_dh_auto_configure: dh_auto_configure -- --with-llvm=/usr/lib/llvm-$(CLANG_V) CLANG_FORMAT=clang-format-$(CLANG_V) override_dh_auto_test: # these are time consuming ... ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32 ppc64 ppc64el)) cd tests && CLANG="$(CLANG)" GCC="$(GCC)" ./run_tests endif override_dh_auto_clean: rm -rf tests/tmp_* dh_auto_clean debian/watch0000644000000000000000000000010111771326650010217 0ustar version=3 http://embed.cs.utah.edu/creduce creduce-(.*)\.tar\.gz debian/compat0000644000000000000000000000000211771326405010372 0ustar 8 debian/copyright0000644000000000000000000000523512315003333011117 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: creduce Source: http://embed.cs.utah.edu/creduce/ Files: * Copyright: C-Reduce is Copyright (c) 2011-2012 The University of Utah License: University of Illinois Open Source License C-Reduce is distributed under the following license, which is often called the "University of Illinois Open Source License." . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. . * Neither the names of the University of Utah nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. Files: debian/* Copyright: 2012 Matthias Klose License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/source/0000755000000000000000000000000011771326405010474 5ustar debian/source/format0000644000000000000000000000001411771326405011702 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012372436470010625 5ustar debian/patches/disable-test-needing-kcc.diff0000644000000000000000000000043112372436470016202 0ustar # this is not packaged, https://code.google.com/p/c-semantics/ --- a/tests/run_tests +++ b/tests/run_tests @@ -83,6 +83,8 @@ if (scalar(@ARGV)>0) { } } else { for (my $i=0; $iout.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ ! grep 'eliding middle term' out.txt &&\ @@ -31,7 +34,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ + $GCC -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ ! grep 'no semicolon at end' outa.txt &&\ @@ -53,6 +56,6 @@ else exit 1 fi -# clang --analyze "$1" > out_analyze.txt 2>&1 &&\ +# $CLANG --analyze "$1" > out_analyze.txt 2>&1 &&\ # ! grep garbage out_analyze.txt &&\ # ! grep undefined out_analyze.txt &&\ Index: b/tests/test1.sh =================================================================== --- a/tests/test1.sh +++ b/tests/test1.sh @@ -13,10 +13,13 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ ! grep 'eliding middle term' out.txt &&\ @@ -31,7 +34,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ + $GCC -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ ! grep 'no semicolon at end' outa.txt &&\ @@ -53,6 +56,6 @@ else exit 1 fi -# clang --analyze "$1" > out_analyze.txt 2>&1 &&\ +# $CLANG --analyze "$1" > out_analyze.txt 2>&1 &&\ # ! grep garbage out_analyze.txt &&\ # ! grep undefined out_analyze.txt &&\ Index: b/tests/test2.sh =================================================================== --- a/tests/test2.sh +++ b/tests/test2.sh @@ -13,10 +13,13 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ ! grep 'eliding middle term' out.txt &&\ @@ -31,7 +34,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ + $GCC -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ ! grep 'no semicolon at end' outa.txt &&\ @@ -53,6 +56,6 @@ else exit 1 fi -# clang --analyze "$1" > out_analyze.txt 2>&1 &&\ +# $CLANG --analyze "$1" > out_analyze.txt 2>&1 &&\ # ! grep garbage out_analyze.txt &&\ # ! grep undefined out_analyze.txt &&\ Index: b/tests/test3.sh =================================================================== --- a/tests/test3.sh +++ b/tests/test3.sh @@ -13,10 +13,13 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ ! grep 'eliding middle term' out.txt &&\ @@ -31,7 +34,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ + $GCC -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ ! grep 'no semicolon at end' outa.txt &&\ @@ -53,6 +56,6 @@ else exit 1 fi -# clang --analyze "$1" > out_analyze.txt 2>&1 &&\ +# $CLANG --analyze "$1" > out_analyze.txt 2>&1 &&\ # ! grep garbage out_analyze.txt &&\ # ! grep undefined out_analyze.txt &&\ Index: b/tests/test4.sh =================================================================== --- a/tests/test4.sh +++ b/tests/test4.sh @@ -13,13 +13,16 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt ulimit -t 15 ulimit -v 2000000 if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'conversions than data arguments' out.txt &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ @@ -32,7 +35,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -Wall -Wextra -O "$1" -o smallz >outa.txt 2>&1 &&\ + $GCC -Wall -Wextra -O "$1" -o smallz >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'without a cast' outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ @@ -52,7 +55,7 @@ if ! grep 'comparison between pointer and integer' outa.txt &&\ ./smallz >out1.txt 2>&1 &&\ grep 'checksum = e' out1.txt &&\ - frama-c -cpp-command "gcc -C -Dvolatile= -E -I." -val-signed-overflow-alarms -val -stop-at-first-alarm -no-val-show-progress -machdep x86_64 -obviously-terminates -precise-unions "$1" > out_framac.txt 2>&1 &&\ + frama-c -cpp-command "$GCC -C -Dvolatile= -E -I." -val-signed-overflow-alarms -val -stop-at-first-alarm -no-val-show-progress -machdep x86_64 -obviously-terminates -precise-unions "$1" > out_framac.txt 2>&1 &&\ ! egrep -i '(user error|assert)' out_framac.txt >/dev/null 2>&1 then exit 0 Index: b/tests/test5.sh =================================================================== --- a/tests/test5.sh +++ b/tests/test5.sh @@ -13,13 +13,16 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt ulimit -t 25 ulimit -v 6000000 if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'conversions than data arguments' out.txt &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ @@ -32,7 +35,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -Wall -Wextra -O "$1" -o smallz >outa.txt 2>&1 &&\ + $GCC -Wall -Wextra -O "$1" -o smallz >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'without a cast' outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ Index: b/tests/test6.sh =================================================================== --- a/tests/test6.sh +++ b/tests/test6.sh @@ -13,13 +13,16 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt # Note: This test script works only with GCC 4.6+. # `-Ofast' was introduced in GCC 4.6. if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ ! grep 'eliding middle term' out.txt &&\ @@ -34,7 +37,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -S -Wall -Wextra -Ofast -o small.s "$1" >outa.txt 2>&1 &&\ + $GCC -S -Wall -Wextra -Ofast -o small.s "$1" >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ ! grep 'no semicolon at end' outa.txt &&\ @@ -56,6 +59,6 @@ else exit 1 fi -# clang --analyze "$1" > out_analyze.txt 2>&1 &&\ +# $CLANG --analyze "$1" > out_analyze.txt 2>&1 &&\ # ! grep garbage out_analyze.txt &&\ # ! grep undefined out_analyze.txt &&\ Index: b/tests/test7.sh =================================================================== --- a/tests/test7.sh +++ b/tests/test7.sh @@ -13,10 +13,13 @@ if [ $# -ne 1 ]; then exit 1 fi +CLANG=${CLANG:-clang} +GCC=${GCC:-gcc} + rm -f out*.txt if - clang -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ + $CLANG -pedantic -Wall -O0 "$1" >out.txt 2>&1 &&\ ! grep 'incompatible redeclaration' out.txt &&\ ! grep 'ordered comparison between pointer' out.txt &&\ ! grep 'eliding middle term' out.txt &&\ @@ -31,7 +34,7 @@ if ! grep 'incompatible pointer to' out.txt &&\ ! grep 'incompatible integer to' out.txt &&\ ! grep 'type specifier missing' out.txt &&\ - gcc -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ + $GCC -c -Wall -Wextra -O "$1" >outa.txt 2>&1 &&\ ! grep uninitialized outa.txt &&\ ! grep 'control reaches end' outa.txt &&\ ! grep 'no semicolon at end' outa.txt &&\ @@ -46,7 +49,7 @@ if ! grep 'incompatible implicit' outa.txt &&\ ! grep 'excess elements in struct initializer' outa.txt &&\ ! grep 'comparison between pointer and integer' outa.txt &&\ - gcc -O3 -w -S -o small.s "$1" &&\ + $GCC -O3 -w -S -o small.s "$1" &&\ grep xmm small.s then exit 0 @@ -54,6 +57,6 @@ else exit 1 fi -# clang --analyze "$1" > out_analyze.txt 2>&1 &&\ +# $CLANG --analyze "$1" > out_analyze.txt 2>&1 &&\ # ! grep garbage out_analyze.txt &&\ # ! grep undefined out_analyze.txt &&\ debian/patches/series0000644000000000000000000000010512372436245012036 0ustar #shared_libs.diff versioned-clang.diff disable-test-needing-kcc.diff debian/changelog0000644000000000000000000000376012474371647011065 0ustar creduce (2.2.1-1~14.04) trusty-proposed; urgency=medium * Build for trusty, using llvm-3.5 on all architectures. LP: #1426725. -- Matthias Klose Sat, 28 Feb 2015 17:23:40 +0100 creduce (2.2.1-1) unstable; urgency=medium * C-Reduce 2.2.1 release. -- Matthias Klose Fri, 10 Oct 2014 09:51:25 +0200 creduce (2.2~pre3-3) unstable; urgency=medium * Bump dependency on clang-format-3.x. * Drop the unversioned build dependency on clang, and allow the tests to use a versioned clang-x.y binary. * Build-depend on frama-c-base. -- Matthias Klose Tue, 12 Aug 2014 14:46:13 +0200 creduce (2.2~pre3-2) unstable; urgency=medium * Build-depend on libedit-dev and zlib1g-dev, missing dependencies of llvm-3.5-dev. -- Matthias Klose Mon, 11 Aug 2014 18:56:34 +0200 creduce (2.2~pre3-1) unstable; urgency=medium * New upstream snapshot (llvm-svn-compatible 20140811). * Build using llvm-3.5-dev and libclang-3.5-dev. -- Matthias Klose Mon, 11 Aug 2014 14:04:49 +0200 creduce (2.2~pre2-1) unstable; urgency=medium * New upstream snapshot (trunk 20140811). -- Matthias Klose Mon, 11 Aug 2014 13:37:15 +0200 creduce (2.2~pre1-2) unstable; urgency=medium * Build-depend on flex. -- Matthias Klose Thu, 27 Mar 2014 14:01:12 +0100 creduce (2.2~pre1-1) unstable; urgency=medium * New upstream snapshot (trunk 20140327). * Build using llvm-3.4. -- Matthias Klose Thu, 27 Mar 2014 12:00:43 +0100 creduce (2.1.0-1) unstable; urgency=low * New upstream version. -- Matthias Klose Fri, 01 Nov 2013 23:16:35 +0200 creduce (2.0.1-3) unstable; urgency=low * Fix a crash, taken from the trunk. -- Matthias Klose Fri, 05 Apr 2013 13:25:28 +0200 creduce (2.0.1-1) experimental; urgency=low * Initial release. Closes: #678645. -- Matthias Klose Tue, 15 Jan 2013 17:23:23 +0100