Why does Valgrind not like my usage of glutCreateWindow?

前端 未结 2 903
攒了一身酷
攒了一身酷 2021-01-23 09:44

I\'m using the following code...

169: const char *title = Title.c_str();
170: glutCreateWindow(title);

... Valgrind gives me the following ...<

相关标签:
2条回答
  • 2021-01-23 10:00

    Valgrind comes with some default error suppression, but that probably does not cover libCLcore.

    The error-checking tools detect numerous problems in the base libraries, such as the GNU C library, and the X11 client libraries, which come pre-installed on your GNU/Linux system. You can't easily fix these, but you don't want to see these errors (and yes, there are many!) So Valgrind reads a list of errors to suppress at startup. A default suppression file is created by the ./configure script when the system is built.

    You can create your own error suppressions that you know are irrelevant to your code.

    0 讨论(0)
  • 2021-01-23 10:00

    Just ignore this; as you can see, the uninitialized value is used way below your code in the OpenGL library, and it's probably not your data that's uninitialized. You might want to dig into it (it may still be a false positive), but you might as well leave it alone.

    0 讨论(0)
提交回复
热议问题