<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">
I found the following bugs in mesa(v100) for SPEC CPU2000 v1.3</div><div style="color: rgb(51, 51, 51); border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><font color="#990000"><br></font></div>
<div style="color: rgb(51, 51, 51); border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><font color="#990000">leak bug 1:</font></div><font class="Apple-style-span" color="#333333">//in file textimage.c at line 345</font><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
gl_text_image* image_to_texture(...) {</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> ...</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
textImage = gl_alloc_texttrue_image(...);</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> if (!textImage)</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
return NULL;</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> ...</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
<span>switch</span> (image->Type) {</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> case ...</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
...</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> default:</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
gl_problem(...)</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> return NULL; <font color="#cc0000">//here without releasing textImage</font></div>
<div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); "> }</div><div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); ">
}</div><div style="color: rgb(51, 51, 51); "><div style="border-collapse: collapse; color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; "><br></div><div style="border-collapse: collapse; color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; ">
leak bug 2:</div><div style="border-collapse: collapse; color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; ">//in file osmesa.c at line 263</div>osmesa = (OSMesaContext) calloc( 1, sizeof(struct osmesa_context) ); 262 if (osmesa) {<br>
osmesa->gl_visual = gl_create_visual( rgbmode, 264 swalpha,</div><div style="color: rgb(51, 51, 51); "> DEPTH_BITS16, </div><div style="color: rgb(51, 51, 51); ">
STENCIL_BITS8, </div><div style="color: rgb(51, 51, 51); "> ACCUM_BITS16, </div>
<div style="color: rgb(51, 51, 51); "> index_bits, </div><div style="color: rgb(51, 51, 51); "> rscale, gscale, bscale, ascale, </div>
<div style="color: rgb(51, 51, 51); "> 8, 8, 8, 0 ); </div><div style="color: rgb(51, 51, 51); "> if (!osmesa->gl_visual) {<br><br> return NULL((void*)0);<font color="#990000">//without releasing osmesa</font></div>
<div style="color: rgb(51, 51, 51); "> }</div><div style="color: rgb(51, 51, 51); "><br></div><div style="color: rgb(51, 51, 51); "><font color="#990000">leak bug 3:</font></div><div style="color: rgb(51, 51, 51); ">
<font color="#990000">//in file drawpix.c at line 1010</font></div><font class="Apple-style-span" color="#333333">void gl_DrawPixels(...) {</font><div style="color: rgb(51, 51, 51); "> ...<br><div> <span>if</span> (ctx->CallDepth == 0) {</div>
<div> image = gl_unpack_pixels( ctx, width, height, format, type, pixels );</div><div> ...</div><div> }</div><div> ...</div><div> <span>if</span> (ctx->ExecuteFlag) {<font color="#990000"> //Taking false branch</font></div>
<div><font color="#990000"> </font> gl_save_DrawPixels( ctx, width, height, format, type, image );</div><div> }</div><div> <span>if</span> (ctx->ExecuteFlag) {<font color="#990000"> //Taking false branch</font><div>
<font color="#990000"> </font> ....</div><div> }<font color="#990000">//Without releasing image</font></div><div>}</div></div></div></span><div><br></div>Is it suitable to report these bugs here?<div>I also sent it to support@spec2000, but didn't have any response.</div>
<div>I'll be glad if you can check these bugs,</div><div>Or do I have another way to report them?</div><div>Thank you!</div><div><div class="gmail_quote">2011/7/12 Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On 07/12/2011 06:38 AM, Zhenbo Xu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
I have been detecting memory leaks in mesa for SPEC2000,<br>
and I found a kind of memory leaks shown in the following code<br>
<br>
gl_text_image* image_to_texture(...) {<br>
...<br>
textImage = gl_alloc_texttrue_image(...);<br>
if (!textImage)<br>
return NULL;<br>
...<br>
switch (image->Type) {<br>
case ...<br>
...<br>
default:<br>
gl_problem(...)<br>
return NULL; //here without releasing textImage<br>
}<br>
}<br>
<br>
Is it a memory leak ?<br>
</blockquote>
<br></div></div>
Possibly. Where is this code exactly?<br><font color="#888888">
<br>
-Brian<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br> ÖÂ<br>Àñ£¡<br><br>----------------------------------------------------<br><br>ÐíÕñ²¨<br><br>
</div>