[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-bugs] Git version: function returning address of parameter



"Eric" == Eric Eide <eeide@cs.utah.edu> and
"Pascal" == Pascal Cuoq <pascal.cuoq@gmail.com> write:

Hi!  This email is about the version-tagging issue, not the code-generation
issue.

	Eric> Recent (post 2.0.0) versions of Csmith output the "short hash" of
	Eric> the latest git commit from which they are built.  For example:
	Eric> 
	Eric> /*
	Eric>  * This is a RANDOMLY GENERATED PROGRAM.
	Eric>  *
	Eric>  * Generator: csmith 2.1.0
	Eric>  * Git version: 4f53cd0

	Pascal> Hmm, I built Csmith in the usual way (configure, make) and I
	Pascal> get headers like:
	Pascal> 
	Pascal> /*
	Pascal>  * This is a RANDOMLY GENERATED PROGRAM.
	Pascal>  *
	Pascal>  * Generator: csmith 2.1.0
	Pascal>  * Git version: exported
	Pascal>  * Options:   --no-volatiles --no-argc --max-array-dim 2 --max-funcs 3
	Pascal> --max-struct-fields 3 --bitfields
	Pascal>  * Seed:      1385513962
	Pascal>  */
	Pascal> 
	Pascal> I'm afraid this is because I downloaded a .tar.gz from the
	Pascal> github website, which is about the level of github involvement
	Pascal> I hoped would suffice.

Ah.  Yes, apparently GitHub does something like "git archive" when one
downloads the ".tar.gz" version.  This excludes the git control files that
would let the build system figure out the current git commit hash.

I'll add this to my to-fix list.  (This goes along with getting the Git commit
hash into the packages created by "make dist".)  Thank you for pointing this
out!

FWIW: instead of pulling down the ".tar.gz", if you have git installed, you can
grab the Csmith sources by doing this:

	git clone git://github.com/csmith-project/csmith.git

That will give you the sources in a new directory "csmith", which you can build
and get the current git commit hash in the generated programs, e.g.:

	mkdir obj && cd obj
	../csmith/configure && make

As a bonus, you get the ability to keep up to date easily:

	cd ../csmith
	git pull

Thanks ---

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX