This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thoger
Recipients akr, barry, benjamin.peterson, dmalcolm, glyph, gregory.p.smith, iankko, loewis, pitrou, psss, r.david.murray, thoger
Date 2010-05-18.14:51:52
SpamBayes Score 0.010319881
Marked as misclassified No
Message-id <1274194314.53.0.627555753924.issue5753@psf.upfronthosting.co.za>
In-reply-to
Content
> My reading of PySys_SetArgv is that if argv is NULL, then 
> "char *argv0 = argv[0];" will read through NULL and thus will
> segfault on a typical platform.

Right.

> I favor Antoine's approach in
> http://bugs.python.org/file13860/setargvex.patch of adding a new API
> entry point, whilst maximizing compatibilty for all of the code our
> there using the existing entry point.

Sadly, this won't help existing applications affected by this problem, without all of them needing to be changed.

My change proposed in msg90336 won't help either, at least not in all cases.  Apps that call PySys_SetArgv with 1, { "myappname", NULL } can still be tricked to add full CWD path at the beginning of sys.path on platforms with realpath().
History
Date User Action Args
2010-05-18 14:51:54thogersetrecipients: + thoger, loewis, barry, gregory.p.smith, pitrou, benjamin.peterson, glyph, psss, r.david.murray, iankko, akr, dmalcolm
2010-05-18 14:51:54thogersetmessageid: <1274194314.53.0.627555753924.issue5753@psf.upfronthosting.co.za>
2010-05-18 14:51:53thogerlinkissue5753 messages
2010-05-18 14:51:52thogercreate