Nux

valgrind: Mismatched free in libnux

Bug #785118 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nux
Fix Released
High
Daniel van Vugt
Unity
Fix Released
Undecided
Unassigned
nux (Ubuntu)
Fix Released
Undecided
Daniel van Vugt
unity (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is a simple one. There are only two new/delete pairs in IOpenGLAsmShader.cpp and they are both wrong.

==1555== Mismatched free() / delete / delete []
==1555== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387)
==1555== by 0x15800D32: nux::IOpenGLAsmVertexShader::Compile() (in /usr/lib/libnux-graphics-0.9.so.0.944.4)

==1555== Mismatched free() / delete / delete []
==1555== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387)
==1555== by 0x15800C42: nux::IOpenGLAsmPixelShader::Compile() (in /usr/lib/libnux-graphics-0.9.so.0.944.4)

This is worth fixing at least to reduce the number of errors reported by valgrind for unity/compiz. It takes up a significant amount of space in valgrind logs and is trivial to fix.

To fix, replace both instances of:
    delete ShaderSource;
with:
    delete[] ShaderSource;

Related branches

description: updated
Changed in nux:
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Changed in nux (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Valgrind log attached. You can find the errors by search for the string "Mismatch".

summary: - valgrind: mismatched new/delete in
- nux::IOpenGLAsm(Pixel|Vertex)Shader::Compile
+ valgrind: Mismatched free in libnux
Changed in unity:
status: New → Invalid
Tim Penhey (thumper)
Changed in nux:
importance: Undecided → High
Changed in unity:
status: Invalid → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed to lp:nux r476.

Changed in nux:
status: In Progress → Fix Committed
Changed in unity:
status: In Progress → Invalid
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Daniel, we use the unity upstream bug as a milestone marker, once you fix an issue, you can set it as fix committed as well. Thanks!

Changed in unity:
status: Invalid → Fix Committed
Changed in nux:
status: Fix Committed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nux - 1.12.0-0ubuntu1

---------------
nux (1.12.0-0ubuntu1) oneiric; urgency=low

  * New upstream release.
    - valgrind: Mismatched free in libnux (LP: #785118)
    - other misc rendering optimizations
 -- Didier Roche <email address hidden> Mon, 26 Sep 2011 12:31:59 +0200

Changed in nux (Ubuntu):
status: In Progress → Fix Released
Changed in unity (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.