Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Dynamic Analysis with Clang building python make unittest failed

Open
#746 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by locating the Python unittest sanitizer check that reads sysconfig CFLAGS and CONFIG_ARGS. Compare it with the listed configure options for AddressSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer, then run the make unittest check to confirm sanitizer detection works with those options.

Written by the indexing model from the issue text.

Description

needs: decision topic-building python topic-test type-feature
截屏2021-09-14 下午9 12 19

use this way to enable sanitizers make unittest check Sanitizer failed; it use _cflags to check

_cflags = sysconfig.get_config_var('CFLAGS') or ''
_config_args = sysconfig.get_config_var('CONFIG_ARGS') or ''
MEMORY_SANITIZER = (
    '-fsanitize=memory' in _cflags or
    '--with-memory-sanitizer' in _config_args
)

ADDRESS_SANITIZER = (
    '-fsanitize=address' in _cflags
)

should replace with configure option

  --with-address-sanitizer
                          enable AddressSanitizer memory error detector,
                          'asan' (default is no)
  --with-memory-sanitizer enable MemorySanitizer allocation error detector,
                          'msan' (default is no)
  --with-undefined-behavior-sanitizer
                          enable UndefinedBehaviorSanitizer undefined
                          behaviour detector, 'ubsan' (default is no)
Dominant language
Python
Stars
2.1k
Forks
1k
Avg merge
2d 12h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/devguide

All issues in python/devguide

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.