classification
Title: segfaults with unexpanded $Revision$ id's in release candidate tarballs
Type: crash Stage: resolved
Components: Build Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, doko, georg.brandl, haypo, python-dev, skrah
Priority: normal Keywords:

Created on 2011-05-31 08:47 by doko, last changed 2011-06-01 01:52 by python-dev. This issue is now closed.

Messages (5)
msg137347 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2011-05-31 08:47
Modules/pyexpat.c (get_version_string) has:

static PyObject *
get_version_string(void)
{
    static char *rcsid = "$Revision$";
    char *rev = rcsid;
    int i = 0;

    while (!isdigit(Py_CHARMASK(*rev)))
        ++rev;

which segfaults, or has unexpected results. -O2 builds don't show the segfaults, but at least debug builds on sparc, ARM, powerpc, m68k.

>>> pyexpat.__version__
'0\x05'

seen with all the current release candidates for 2.7.2, 3.1.4 and 3.2.1
2.5.6 and 2.6.7 don't have this issue.

other occurrences:

./setup.py:__version__ = "$Revision$"
./Demo/scripts/newslist.py:# Newslist  $Revision$
./Demo/scripts/newslist.py:rcsrev = '$Revision$'
./configure.in:AC_REVISION($Revision$)
./Tools/webchecker/websucker.py:__version__ = "$Revision$"
./Tools/webchecker/webchecker.py:__version__ = "$Revision$"
./Tools/world/world:__version__ = '$Revision$'
./Parser/asdl_c.py:        # Value of version: "$Revision$"
./Parser/Python.asdl:module Python version "$Revision$"
./Modules/pyexpat.c:    static char *rcsid = "$Revision$";
./Lib/tkinter/__init__.py:__version__ = "$Revision$"
./Lib/pickle.py:__version__ = "$Revision$"       # Code version
./Lib/xml/parsers/expat.py:__version__ = '$Revision$'
./Lib/pydoc.py:__version__ = "$Revision$"
./Lib/tarfile.py:__version__ = "$Revision$"
msg137349 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-05-31 09:27
See also: Issue 11439
msg137404 - (view) Author: Roundup Robot (python-dev) Date: 2011-06-01 00:08
New changeset 9c1116e582e3 by Benjamin Peterson in branch '2.7':
simply use the Python version for pyexpat.__version__ #12221
http://hg.python.org/cpython/rev/9c1116e582e3

New changeset 9c23efa3f5c7 by Benjamin Peterson in branch '3.1':
simply use the Python version for pyexpat.__version__ #12221
http://hg.python.org/cpython/rev/9c23efa3f5c7

New changeset f2f74b8d6767 by Benjamin Peterson in branch '3.2':
merge 3.1 (#12221)
http://hg.python.org/cpython/rev/f2f74b8d6767

New changeset d1291e048163 by Benjamin Peterson in branch 'default':
merge 3.2 (#12221)
http://hg.python.org/cpython/rev/d1291e048163
msg137406 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-06-01 00:13
I've fixed the pyexpat.__version__ from segfaulting. The other ones are harmless and can be removed later.
msg137411 - (view) Author: Roundup Robot (python-dev) Date: 2011-06-01 01:52
New changeset f3553d5083f8 by Benjamin Peterson in branch 'default':
remove __version__s dependent on subversion keyword expansion (closes #12221)
http://hg.python.org/cpython/rev/f3553d5083f8
History
Date User Action Args
2011-06-01 01:52:21python-devsetstatus: open -> closed

resolution: fixed
messages: + msg137411
stage: resolved
2011-06-01 00:13:57benjamin.petersonsetpriority: release blocker -> normal

messages: + msg137406
2011-06-01 00:08:28python-devsetnosy: + python-dev
messages: + msg137404
2011-05-31 14:57:24hayposetnosy: + haypo
2011-05-31 09:27:49skrahsetnosy: + skrah
messages: + msg137349
2011-05-31 08:55:55dokosettype: crash
2011-05-31 08:47:43dokocreate