TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Valgrind Finds Thousands Of Potential Issues With Mesa [Phoronix]

14 点作者 rohshall将近 12 年前

5 条评论

lysium将近 12 年前
While valgrind finds issues, it&#x27;s totally unclear if these issues are serious. The explanation of the Mesa developer that responded sounds reasonable (valgrind cannot track past ioctl).<p>I&#x27;m wondering, if this article is more about valgrind than about Mesa: what does it help if only a fraction of the reported issues is an actual issue?
评论 #6216930 未加载
forgottenpaswrd将近 12 年前
Well, most of the valgrind errors should be repetitions, so I would say there are probably 5000 error or so.<p>It is a great idea to use Valgrind or other automatic tools(we make our own), but it is really hard when you had already developed a project without it.<p>Going from 507,326 errors to 507,325 or 507,310 is not very motivating(0.000029% progress).
cnvogel将近 12 年前
It&#x27;s a little unfortunate that the author did not at least try to hunt down a <i>few</i> of them and present a conlclusion about if the warnings are benign or serious.<p>I don&#x27;t have the exact version of Mesa that the blog-post (<a href="http://www.americanteeth.org/2013/08/14/valgrind-is-not-optional/" rel="nofollow">http:&#x2F;&#x2F;www.americanteeth.org&#x2F;2013&#x2F;08&#x2F;14&#x2F;valgrind-is-not-opti...</a>) seems to refer to. But the first two functions in the i965 driver code that valgrind complained about basically do something like the following code:<p><pre><code> uint32_t *surf = brw_state_batch(...) surf[0] = ...stuff with flags for the GPU-code... (...) surf[5] = ...even more stuff, encoding coordinates and so on... (...) </code></pre> Unfortunately that pointer &quot;*surf&quot; seems to be allocated by some batch-buffer-memory allocation magic, so (after only greping through the source for 5 minutes) I would not be able to conclude if it&#x27;s a fake warning (maybe refering to some memory that is allocated by some DRI kernel interface mmap-magic) or indeed serious (say, a mistake when calculating the proper boundaries of allocated pages). But with a library used as regularly as Mesa I&#x27;d give the authors the benefit of doubt and guess that to detect the subtle errors, one would first have to educate valgrind about that DRI-specific way of allocating memory.
dmm将近 12 年前
This is completely a non-story. If you&#x27;re going to write a blog entry about a project&#x27;s valgrind results at least track down one of the reports that&#x27;s actually a bug.
pjmlp将近 12 年前
The joys of safety when using C.<p>Validation tools and warnings as errors are not optional when using C and its derivatives (Obj-C&#x2F;C++).<p>Not everyone is an elite C developer and even those can make mistakes.