[pypy-issue] Issue #2840: Result of os.path.expanduser sometimes contains NUL character (pypy/pypy)

Florian Schulze issues-reply at bitbucket.org
Wed May 30 02:59:23 EDT 2018

New issue 2840: Result of os.path.expanduser sometimes contains NUL character

Florian Schulze:

In the test runs for [devpi](http://github.com/devpi/devpi/) we occasionally get failures, because in ``requests`` the check for ``~/.netrc`` fails. What happens is that the ``os.path.expanduser`` call for it results in strings like this: ``p:/var/spool/uucp:/usr/sbin/nologin\x00/.netrc``, which looks like some other memory area than ``os.environ['HOME']`` was used. At first I filed a [bug report with travis ci](https://github.com/travis-ci/travis-ci/issues/9616), but because I only see this with pypy/pypy3 I now suspect, that there is a bug in pypy.

A recent occurence was this:

Unfortunately I never saw this anywhere else, so I wasn't able to narrow down the circumstances. In the worst case this has something to do with the way travis-ci works (running on GCE afaik when using ``sudo: false`` like in our case).

The tests run daily and for commits and PRs. The error happens about once per week.

More information about the pypy-issue mailing list