[Pkg-opencl-devel] Bug#920497: Bug#920497: Bug#920497: clblas: *ger out of bounds memory access under pocl

Rebecca N. Palmer rebecca_palmer at zoho.com
Sun Feb 2 21:38:12 GMT 2020


On 01/02/2020 13:32, Andreas Beckmann wrote:
> Is this issue still reproducible with recent versions of pocl?

Yes, and if anything it's worse in that it can now be silently wrong 
answers not just crashes.

(Each example output below is from a separate run of the test suite, 
after reverting the size to 4,5 - 
libgpuarray/debian/patches/920497_ger_workaround.patch normally sets it 
to 64,64 to avoid this bug.)

$ DEVICE=opencl0:0 python3 -m nose -v 
/usr/lib/python3/dist-packages/pygpu/tests/test_blas.py:test_ger

pocl 1.4-4 (sid):

pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, False, False) 
... FAIL
free(): invalid next size (normal)
Aborted
[2 non-failing runs]
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, True, False) 
... malloc(): invalid size (unsorted)
Aborted
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, True, True) 
... FAIL
[...]
Mismatch: 45%
Max absolute difference: 15.6799345
Max relative difference: 0.86604244
  x: array([[36.466873, 18.703169, 16.077265, 28.332705, 12.42333 ],
        [55.76504 , 21.695398, 15.684309, 43.812134, 16.141874],
        [ 5.726563, 11.466312,  2.295661,  7.407461,  2.720506],...
  y: array([[36.466873, 18.703169, 16.077265, 28.332705, 12.42333 ],
        [66.77751 , 21.695398, 26.107975, 43.812134, 26.334879],
        [21.406498, 11.466312, 17.137228,  7.407461, 17.233652],...
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, True, False) 
... malloc_consolidate(): invalid chunk size
Aborted
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, True, True) 
... FAIL
[...]
Mismatch: 60%
Max absolute difference: 2.3951557e+23
Max relative difference: 1.
  x: array([[62.353832, 20.148596, 76.49873 , 39.474213, 32.401543],
        [13.127782, 10.97283 ,  5.661376,  9.378635,  6.7582  ],
        [11.341855,  6.147425, 17.3454  ,  6.12348 , 11.391024],...
  y: array([[ 6.235383e+01,  2.014860e+01,  7.649873e+01,  3.947421e+01,
          3.240154e+01],
        [ 3.232117e+01, -2.395156e+23,  1.929382e+01,  9.378635e+00,...

pocl 1.4-5 (experimental):
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, False, True) 
... malloc(): unsorted double linked list corrupted
Aborted
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, False, True) 
... corrupted size vs. prev_size
Aborted
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, True, True) 
... FAIL
double free or corruption (!prev)
Aborted
pygpu.tests.test_blas.test_ger(4, 5, 'float32', 'f', 1, 1, True, True) 
... FAIL
[...]
Mismatch: 60%
Max absolute difference: 6.506278e+37
Max relative difference: 1.
  x: array([[41.57771 , 65.34176 , 20.970417, 52.550655, 46.916115],
        [25.290237, 27.915987, 11.624907, 23.786522, 30.36904 ],
        [37.770523, 45.49727 , 14.813134, 42.574074, 41.936626],...
  y: array([[ 4.157771e+01,  6.534176e+01,  2.097042e+01,  5.255066e+01,
          4.691611e+01],
        [ 3.974606e+01,  2.791599e+01,  2.405841e+01, -6.506278e+37,...



More information about the Pkg-opencl-devel mailing list