Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Valgrind builder + factory with a selected set of tests #520

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

pablogsal
Copy link
Member

No description provided.

@pablogsal
Copy link
Member Author

This bad boy detected the problem in python/cpython#123821:

==602795== Conditional jump or move depends on uninitialised value(s)
==602795==    at 0x240052: tok_get_fstring_mode (tokenizer.c:2705)
==602795==    by 0x241214: tok_get (tokenizer.c:2857)
==602795==    by 0x241214: _PyTokenizer_Get (tokenizer.c:2862)
==602795==    by 0x209857: _PyPegen_fill_token (pegen.c:298)
==602795==    by 0x2245F7: fstring_replacement_field_rule (parser.c:15914)
==602795==    by 0x224FB1: fstring_middle_rule (parser.c:15858)
==602795==    by 0x224FB1: _loop0_114_rule (parser.c:32096)
==602795==    by 0x224FB1: fstring_rule (parser.c:16193)
==602795==    by 0x224FB1: _tmp_259_rule (parser.c:40681)
==602795==    by 0x224FB1: _loop1_115_rule (parser.c:32163)
==602795==    by 0x224FB1: strings_rule (parser.c:16294)
==602795==    by 0x21478F: atom_rule (parser.c:14690)
==602795==    by 0x215D57: primary_raw (parser.c:14328)
==602795==    by 0x215D57: primary_rule (parser.c:14126)
==602795==    by 0x216017: await_primary_rule (parser.c:14080)
==602795==    by 0x216341: power_rule (parser.c:13956)
==602795==    by 0x216341: factor_rule (parser.c:13906)
==602795==    by 0x2169CD: term_raw (parser.c:13747)
==602795==    by 0x2169CD: term_rule (parser.c:13509)
==602795==    by 0x216D2E: sum_raw (parser.c:13463)
==602795==    by 0x216D2E: sum_rule (parser.c:13342)
==602795==    by 0x2170CE: shift_expr_raw (parser.c:13302)
==602795==    by 0x2170CE: shift_expr_rule (parser.c:13181)
==602795==  Uninitialised value was created by a heap allocation
==602795==    at 0x48447A8: malloc (vg_replace_malloc.c:446)
==602795==    by 0x23AD1D: tok_new (tokenizer.c:68)
==602795==    by 0x2410B8: _PyTokenizer_FromFile (tokenizer.c:959)
==602795==    by 0x20AB6C: _PyPegen_run_parser_from_file_pointer (pegen.c:972)
==602795==    by 0x40737C: pyrun_file (pythonrun.c:1634)
==602795==    by 0x40737C: _PyRun_SimpleFileObject (pythonrun.c:433)
==602795==    by 0x4079CB: _PyRun_AnyFileObject (pythonrun.c:78)
==602795==    by 0x4313AB: pymain_run_file_obj (main.c:360)
==602795==    by 0x4313AB: pymain_run_file (main.c:379)
==602795==    by 0x4313AB: pymain_run_python.constprop.0 (main.c:633)
==602795==    by 0x431A2A: Py_RunMain (main.c:713)
==602795==    by 0x431A2A: pymain_main (main.c:743)
==602795==    by 0x431A2A: Py_BytesMain (main.c:767)
==602795==    by 0x49A3E07: (below main) (libc_start_call_main.h:58)

"--without-pymalloc",
]
testFlags = [
"test_grammar",
Copy link
Member Author

@pablogsal pablogsal Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am starting with this and grow slowly the list of tests as we did with the undefined behaviour sanitizer, which proved to be a very successful strategy

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM, but I don't know if the buildbot is working :-)

master/custom/factories.py Outdated Show resolved Hide resolved
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
@pablogsal pablogsal merged commit 05858ec into python:main Sep 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants