Skip to content
C-Reduce, a C program reducer
C++ C Shell Makefile Perl CMake Other
Latest commit 9b0d493 Jun 25, 2016 @eeide eeide Merge new way to handle git hash at compile time.
Previously, we passed the current (short) git hash to the C/C++ compiler
at compile time via a command-line option.  Now, we generate a source
file containing the git hash at compile time.  More significantly, if we
detect that the git hash has changed, we regenerate the source file.

This method is more friendly to users of the CMake-based build path.
Previously, CMake would detect that the current git hash had changed,
and thus the command-line options had changed, and thus trigger a
recompilation of every C/C++ file.  Ugh.  Now this doesn't happen: now,
only the one C/C++ file that contains the hash value needs to be
recompiled.  (The `creduce/creduce_config.pm` file also needs to be
regenerated.  The CMake-based path already did this, and this has not
changed.)

This method is also more precise for users of the Automake-based build
path.  Previously, we didn't detect when changes to the current git hash
required things to be rebuilt.  Now we do.
Failed to load latest commit information.
autoconf Update to current libtool (v2.4.6). May 1, 2015
clang_delta Generate and compile `clang_delta/git_version.cpp`. Jun 25, 2016
clex Remove "old way" of handling git hash for compiles. Jun 25, 2016
cmake Add CMake module for extracting git info. Jun 10, 2016
creduce Rebuild `creduce_config.pm` when git hash changes. Jun 25, 2016
delta Remove "old way" of handling git hash for compiles. Jun 25, 2016
m4 Fix regexps for unwanted `-f...` options. Apr 26, 2016
scripts Use `#!/usr/bin/env bash` in other scripts. Apr 25, 2016
tests Use envvars to select Clang and GCC for tests. May 11, 2016
unifdef Remove "old way" of handling git hash for compiles. Jun 25, 2016
.gitattributes Use the git-version CMake module. Jun 10, 2016
.gitignore Make minor cleanups to ".gitignore" files. May 22, 2016
.travis.yml Build against the LLVM development branch. Jul 26, 2015
AUTHORS Update package build and installation instructions. Jun 6, 2012
CMakeLists.txt Generate and compile `clang_delta/git_version.cpp`. Jun 25, 2016
COPYING Update copyright years. May 3, 2015
ChangeLog Initial work toward Autotool-ization. Mar 19, 2012
Dockerfile Add copyright and license statement to Dockerfile. Nov 16, 2015
INSTALL Add documentation for CMake-based build path. Jun 11, 2016
Makefile.am Include `cmake` directory in distributions. Jun 11, 2016
Makefile.in Include `cmake` directory in distributions. Jun 11, 2016
NEWS Initial work toward Autotool-ization. Mar 20, 2012
README doc tweaks Sep 21, 2014
TODO add desired transformation from Colin Percival Apr 3, 2016
aclocal.m4 Regenerate Autoconf stuff. Oct 30, 2015
bootstrap Initial work toward Autotool-ization. Mar 20, 2012
cmake_config.h.in Added CMake configuration for Windows Jul 9, 2015
config.h.in Rerun Autoconf. May 1, 2015
configure Increment version number to 2.6.0. May 13, 2016
configure.ac Look for GNU Indent as `gindent`, too. Apr 26, 2016
git-hash.sh Refer to the `COPYING' file for license details. Jun 6, 2012
version.m4 Increment version number to 2.6.0. May 13, 2016

README

-*- mode: Text -*-

--------------------------------------------------------------------

About C-Reduce:

C-Reduce is a tool that 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.

NOTE: C-Reduce happens to do a pretty good job reducing the size of
programs in languages other than C/C++, such as JavaScript and Rust.
If you need to reduce programs in some other language, please give it
a try.

Documentation and other information can be found at the C-Reduce web
page:

  http://embed.cs.utah.edu/creduce/

--------------------------------------------------------------------

Installation:

see the file INSTALL

--------------------------------------------------------------------

Notes:

1. When set to use more than one core, C-Reduce can cause space in
/tmp to be leaked. This happens because sometimes C-Reduce will kill a
compiler invocation when a result that is computed in parallel makes
it clear that that compiler invocation is no longer useful. If the
compiler leaves files in /tmp when it is killed, C-Reduce has no way
to discover and remove the files. You will need to do this manually
from time to time if temporary file space is limited. The leakage is
typically pretty slow. If you need to avoid this problem altogether,
you can run C-Reduce on a single core (using "-n 1") in which case
C-Reduce will never kill a running compiler instance. Alternatively, a
command line option such as -pipe (supported by gcc) may suppress the
creation of temporary files altogether. Another possibility is to set
the TMPDIR environment variable to something like "/tmp/creduce-stuff"
before invoking C-Reduce -- assuming that the tools you are invoking
respect this variable.

2. Each invocation of the interestingness test is performed in a fresh
temporary directory containing a copy of the file that is being
reduced. If your interestingness test requires access to other files,
you should either copy them into the current working directory or else
refer to them using an absolute path.

--------------------------------------------------------------------
Something went wrong with that request. Please try again.