Skip to content

Conversation

@wiredfool
Copy link
Member

Potential fix for pytest-valgrind mark not defined for non-valgrind docker tests.

@hugovk hugovk added the Testing label Apr 1, 2021
@hugovk
Copy link
Member

hugovk commented Apr 1, 2021

@hugovk
Copy link
Member

hugovk commented Apr 1, 2021

Although it does detect a bunch of errors. Should these also fail the CI?

Valgrind has detected an error:

**304** 
**304** **********************************************************************
**304** Tests/test_image.py::TestImage::test_exif_jpeg
**304** **********************************************************************
**304** 
**304** **********************************************************************

XFAIL Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_levels_rgba
  reason: Error, but valgrind clean, using xfail.
XFAIL Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_levels_la
  reason: Error, but valgrind clean, using xfail.
XFAIL Tests/test_image_resample.py::TestCoreResampleBox::test_tiles
  reason: [VALGRIND ERROR]

Valgrind has detected an error:

**304** 
**304** **********************************************************************
**304** Tests/test_image_resample.py::TestCoreResampleBox::test_tiles
**304** **********************************************************************
==304== Use of uninitialised value of size 8
==304==    at 0x8B8BB87: ImagingResampleHorizontal_8bpc (Resample.c:346)
==304==    by 0x8B8C03B: ImagingResampleInner (Resample.c:664)
==304==    by 0x8B8C30A: ImagingResample (Resample.c:611)
==304==    by 0x8B812E5: _resize (_imaging.c:1812)
==304==    by 0x64BF47: method_vectorcall_VARARGS (descrobject.c:300)
==304==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==304==    by 0x4EB73C: call_function (ceval.c:4963)
==304==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==304==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==304==    by 0x4DFDFB: _PyEval_EvalCodeWithName (ceval.c:4298)
==304==    by 0x436C40: _PyFunction_Vectorcall (call.c:435)
==304==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==304==    by 0x4EB73C: call_function (ceval.c:4963)
==304==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==304==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==304==    by 0x43627B: function_code_fastcall (call.c:283)
==304== 
==304== Use of uninitialised value of size 8
==304==    at 0x8B8BB92: ImagingResampleHorizontal_8bpc (Resample.c:346)
==304==    by 0x8B8C03B: ImagingResampleInner (Resample.c:664)
==304==    by 0x8B8C30A: ImagingResample (Resample.c:611)
==304==    by 0x8B812E5: _resize (_imaging.c:1812)
==304==    by 0x64BF47: method_vectorcall_VARARGS (descrobject.c:300)
==304==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==304==    by 0x4EB73C: call_function (ceval.c:4963)
==304==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==304==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==304==    by 0x4DFDFB: _PyEval_EvalCodeWithName (ceval.c:4298)
==304==    by 0x436C40: _PyFunction_Vectorcall (call.c:435)
==304==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==304==    by 0x4EB73C: call_function (ceval.c:4963)
==304==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==304==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==304==    by 0x43627B: function_code_fastcall (call.c:283)
==304== 
==304== Use of uninitialised value of size 8
==304==    at 0x8B8BBA2: ImagingResampleHorizontal_8bpc (Resample.c:346)
==304==    by 0x8B8C03B: ImagingResampleInner (Resample.c:664)
==304==    by 0x8B8C30A: ImagingResample (Resample.c:611)
==304==    by 0x8B812E5: _resize (_imaging.c:1812)
==304==    by 0x64BF47: method_vectorcall_VARARGS (descrobject.c:300)
==304==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==304==    by 0x4EB73C: call_function (ceval.c:4963)
==304==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==304==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==304==    by 0x4DFDFB: _PyEval_EvalCodeWithName (ceval.c:4298)
==304==    by 0x436C40: _PyFunction_Vectorcall (call.c:435)
==304==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==304==    by 0x4EB73C: call_function (ceval.c:4963)
==304==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==304==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==304==    by 0x43627B: function_code_fastcall (call.c:283)
==304== 

@wiredfool
Copy link
Member Author

There are a few XFAILed here because they're undefined behaviour and I haven't tracked them down yet. (some of which are deep in JPEG guts). The recent addition of the fuzzer test -- which runs all the images through open/load has retriggered some of them that are xfailed (I think) but I haven't had a chance to get to them.

My idea for now is to prevent additional items from making valgrind worse. Which I'm failing at a bit with the fuzzer test, but to be fair, that's increased testing, not increased code to be tested.

@hugovk hugovk merged commit b90c73f into python-pillow:master Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants