Author Devin Jeanpierre
Recipients Devin Jeanpierre, alex, brett.cannon, christian.heimes, gregory.p.smith, terry.reedy
Date 2017-09-11.20:14:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505160869.29.0.512670209184.issue29505@psf.upfronthosting.co.za>
In-reply-to
Content
> i'd rather make this work in oss-fuzz on cpython.  can you point me to how oss-fuzz works and what it wants to do so i can better understand what it needs?

I don't have any details except for what's in the PR to oss-fuzz (https://github.com/google/oss-fuzz/pull/731)  My understanding is matches what you've said so far:

Python is built to one directory (/out/), but then needs to be run from another directory (/out/ is renamed to /foo/bar/baz/out/). We need python to still work. I have no idea how to do this.

The only suggestion on #python-dev IRC was to statically link a libpython.a, but this doesn't avoid needing to import libraries like "encodings" dynamically, so they still need to be locatable on disk.

Is there a way to build python so that it doesn't use absolute paths to everything, and so that the install can be moved at will? Or is there a way to tell it that it was moved at runtime? (I am unconvinced PYTHONPATH is a maintainable solution, if it works at all...)


oss-fuzz is not going to change away from its model (I asked if they could, they said no), so we're stuck with making Python compatible with it one way or another.  This is why I am so drawn to running the test internally on Google's infrastructure anyway: we already _did_ all this work already, via hermetic python. Doing it a second time, but worse, seems annoying.
History
Date User Action Args
2017-09-11 20:14:29Devin Jeanpierresetrecipients: + Devin Jeanpierre, brett.cannon, terry.reedy, gregory.p.smith, christian.heimes, alex
2017-09-11 20:14:29Devin Jeanpierresetmessageid: <1505160869.29.0.512670209184.issue29505@psf.upfronthosting.co.za>
2017-09-11 20:14:29Devin Jeanpierrelinkissue29505 messages
2017-09-11 20:14:29Devin Jeanpierrecreate