Access Violation in Linux OpenGLES driver libs?

Regards,

I recently ran into an error that occured to me while running an Opengl ES 3 application with a memory debugging tool on an Arm Aarch64 embedded system with a powervr chip using linux.

Basically what seems to happen is that the driver tries to load a file called “/etc/powervr.ini”, allocating a buffer that is exactly as big as this file, then copies the file into it, then appearently decomposes this buffer into lines using the libc strcspn function. However, the strcspn function seems to read beyond the end of this buffer/string as it doesn’t have a null terminator.

There seems to be an EOF marker in memory but it is located right behind the end of the area allocated by malloc.

Is this problem known? If yes, has it been fixed?

Regards

Edit: May be a libc problem (version: 2.23)

Edit 2: Just a guess: Do you map stuff with mmap assuming that it will null out everything behind the map, then use c functions that need null terminated strings?

Hi Edgar,

Many thanks for reporting this issue (and for your analysis). We will have a look to see which might be the problem.

Best regards.

Carlos.

Hi Edgar,

We have investigated this issue and we believe your report is against a 1.7 driver.
Your analysis is correct and there was indeed an issue in those drivers. However, the code in question was a branch specific change and doesn’t appear in any other version.

Many thanks for reporting this.

Best regards.

Carlos.