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.

classification
Title: Bunch of path leaks on Python 3.7 on Release
Type: enhancement Stage:
Components: Build Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.fahlgren, illera88
Priority: normal Keywords:

Created on 2018-07-27 20:05 by illera88, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg322512 - (view) Author: Alberto (illera88) Date: 2018-07-27 20:05
I've downloaded and compiled from sources Python 3.7 in windows.
The compilation process goes great but there are a lot of paths (using __FILE__ in the source) that gets leaked in the Release version and that should not happen.

This is because __FILE__ is used outside of assert or DEBUG ifdefs which should be avoided.
Here is the list I've got after doing a strings on a build release:

c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\typeobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\python\import.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\moduleobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\longobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\python\getargs.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\frameobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\gcmodule.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\object.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\listobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\fileobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\dictobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\python\traceback.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\tupleobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\classobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\unicodeobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\bytearrayobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\setobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\bytesobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\weakrefobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\cellobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\iterobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\codeobject.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\python\ast.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\python\pystrtod.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_asynciomodule.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\arraymodule.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_sha3\sha3module.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\parsermodule.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\zipimport.c
FFI_TRAMPOLINE_SIZE too small in c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_ctypes\libffi_msvc\ffi.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\typearith.h
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\mpdecimal.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\context.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_ssl.c
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\pyexpat.c
msg322514 - (view) Author: Alberto (illera88) Date: 2018-07-27 20:30
In Visual Studio /FP should be removed:
In C/C++ → Advanced → Use Full Paths: No

But still for some weird reason there is one path that gets leaked:
c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\typearith.h

In the project from where I'm using python I already removed /FP so even if it is a header it should not be showing the full path AFAIK.

Any idea?
msg323061 - (view) Author: Eric Fahlgren (eric.fahlgren) * Date: 2018-08-03 16:39
I believe that the CL command line switch is /FC, not /FP:

https://msdn.microsoft.com/en-us/library/027c4t2s.aspx
History
Date User Action Args
2022-04-11 14:59:03adminsetgithub: 78433
2018-08-03 16:39:27eric.fahlgrensetnosy: + eric.fahlgren
messages: + msg323061
2018-07-27 20:30:42illera88setmessages: + msg322514
2018-07-27 20:05:42illera88create