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 vstinner
Recipients vstinner
Date 2022-03-01.09:38:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646127510.42.0.802803841072.issue46887@roundup.psfhosted.org>
In-reply-to
Content
"./Programs/_freeze_module zipimport" fails with MSAN:
---
$ make SHELL="bash -x"
(...)
+ ./Programs/_freeze_module zipimport ./Lib/zipimport.py Python/frozen_modules/zipimport.h
==110524==WARNING: MemorySanitizer: use-of-uninitialized-value
==110523==WARNING: MemorySanitizer: use-of-uninitialized-value
==110526==WARNING: MemorySanitizer: use-of-uninitialized-value
==110525==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4b8cfc in read_text /home/vstinner/python/main/Programs/_freeze_module.c:109:9
    #1 0x4b8cfc in main /home/vstinner/python/main/Programs/_freeze_module.c:224:24
    #2 0x7fe8acb8555f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
    #3 0x7fe8acb8560b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
    #4 0x435f44 in _start (/home/vstinner/python/main/Programs/_freeze_module+0x435f44)

  Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
    #0 0x4b72e0 in main /home/vstinner/python/main/Programs/_freeze_module.c:205

SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/vstinner/python/main/Programs/_freeze_module.c:109:9 in read_text
Exiting
make: *** [Makefile:1184: Python/frozen_modules/importlib._bootstrap_external.h] Error 1
make: *** Waiting for unfinished jobs....
    #0 0x4b8cfc in read_text /home/vstinner/python/main/Programs/_freeze_module.c:109:9
    #1 0x4b8cfc in main /home/vstinner/python/main/Programs/_freeze_module.c:224:24
    #2 0x7f64ecd1355f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
    #3 0x7f64ecd1360b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
    #4 0x435f44 in _start (/home/vstinner/python/main/Programs/_freeze_module+0x435f44)

  Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
    #0 0x4b72e0 in main /home/vstinner/python/main/Programs/_freeze_module.c:205

SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/vstinner/python/main/Programs/_freeze_module.c:109:9 in read_text
Exiting
make: *** [Makefile:1176: Python/frozen_modules/getpath.h] Error 1
    #0 0x4b8cfc in read_text /home/vstinner/python/main/Programs/_freeze_module.c:109:9
    #1 0x4b8cfc in main /home/vstinner/python/main/Programs/_freeze_module.c:224:24
    #2 0x7fb2a178d55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
    #3 0x7fb2a178d60b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
    #4 0x435f44 in _start (/home/vstinner/python/main/Programs/_freeze_module+0x435f44)

    #0 0x4b8cfc in read_text /home/vstinner/python/main/Programs/_freeze_module.c:109:9
    #1 0x4b8cfc in main /home/vstinner/python/main/Programs/_freeze_module.c:224:24
    #2 0x7f4d471ca55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
    #3 0x7f4d471ca60b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
    #4 0x435f44 in _start (/home/vstinner/python/main/Programs/_freeze_module+0x435f44)

  Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
  Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
    #0 0x4b72e0 in main /home/vstinner/python/main/Programs/_freeze_module.c:205

    #0 0x4b72e0 in main /home/vstinner/python/main/Programs/_freeze_module.c:205

SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/vstinner/python/main/Programs/_freeze_module.c:109:9 in read_text
SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/vstinner/python/main/Programs/_freeze_module.c:109:9 in read_text
Exiting
Exiting
make: *** [Makefile:1181: Python/frozen_modules/importlib._bootstrap.h] Error 1
make: *** [Makefile:1187: Python/frozen_modules/zipimport.h] Error 1
---

Build Python with clang MSAN:
---
./configure --with-pydebug --with-memory-sanitizer CC=clang LD=clang
make
---
History
Date User Action Args
2022-03-01 09:38:30vstinnersetrecipients: + vstinner
2022-03-01 09:38:30vstinnersetmessageid: <1646127510.42.0.802803841072.issue46887@roundup.psfhosted.org>
2022-03-01 09:38:30vstinnerlinkissue46887 messages
2022-03-01 09:38:30vstinnercreate