#1009710 libglfw3: valgrind finds memory leak

Package:
libglfw3
Source:
glfw3
Description:
portable library for OpenGL, window and input (x11 libraries)
Submitter:
Bérenger
Date:
2022-04-14 21:30:03 UTC
Severity:
minor
Tags:
#1009710#5
Date:
2022-04-14 21:13:10 UTC
From:
To:
When writting a minimal C program with glfw3, valgrind find leaked
memory.

Code of the program:

```
#include <GLFW/glfw3.h>

int main()
{
	glfwInit();
	glfwTerminate();
}
```

Compiling and running with:
```
clang test.c $(pkg-config --libs glfw3)
valgrind --leak-check=full --show-leak-kinds=all --log-file=log  ./a.out
```

will generate the report showing the leaks. You will need to install
several dbgsym packages to see the whole stacks, though.

#1009710#10
Date:
2022-04-14 21:27:08 UTC
From:
To:
The previous report was done after noticing a lot more of problems when
using the stack glfw3 + glm + epoxy + mesa with intel drivers.
Valgrind reports lot of memory problems notably when using
glCompileShader, when loading shared libraries (dlopen) and many more.
I can provide the source code that I'm writing which triggers those,
it's intended to be FOSS in any case, but it's very young and does
nothing interesting (taking my time to write code with every possible
error checking in the graphical stack).

I have not reported those information is original bug report, because
they do not belong directly to glfw3. Sending multiple reports would be
an option, but I'm not sure it's very productive, especially if this is
going to be ignored (problems are only seen with valgrind AFAIK and
some of those might be related to stuff I did in my code, notably the
shaders. I need to dig more to be confident enough there to send a
report.)