Devin Jeanpierre added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29505>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to