Libmali (opencl) in Lebian causes out of bounds memory write

Hey there,

I’m trying to use OpenCL on the Hikey970 with Debian from Lemaker (the and the is provided in the image from Lemaker).

I’m using it within some project which uses custom allocators. The allocators check the allocated memory for out of bound writes (with borders in front of and after the allocated memory).

The opencl call…

`cl::Program program(<some args>);`

There is some stack trace:

…allocates and frees memory internally and leads to overwritten memory borders, which is then detected by the custom allocators. Which is obviously not expected.

The whole project is compiled with gcc-7 and the project works fine for other platforms (e.g. with x64 (Ubuntu) or with Android on some Qualcomm SoC it works totally fine).

Seems like an issue with the mali driver.

Does anybody know, if the libmali of Lebian is doing nasty things or even broken or if there are some sources for those drivers around.



Board based on the Kirin 970 - HI3670 Application Processor
More info: (Website coming soon…)
Buy now:

Since this is not open source library, it’s hard to help here, maybe you should contact lemaker and provide a simple program example to reproduce the issue.