After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671985 - cogl matrix stack has a use after realloc
cogl matrix stack has a use after realloc
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-03-13 13:12 UTC by Dave Airlie
Modified: 2012-03-13 13:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (1.21 KB, patch)
2012-03-13 13:12 UTC, Dave Airlie
none Details | Review

Description Dave Airlie 2012-03-13 13:12:30 UTC
Created attachment 209606 [details] [review]
proposed fix

While valgrinding gnome-shell I noticed that cogl has a use after realloc
in  _cogl_matrix_stack_top_mutable

After the g_array_set_size, it continues to use a pointer into the stack from state, however this pointer may no longer be valid after a reallocation has occured.

I'm not 100% sure about my patch as I'm not fully sure how the stack works, so please review it.
Comment 1 Robert Bragg 2012-03-13 13:43:13 UTC
thanks, I've pushed this to master as commit d42efa37415931f