Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1671)

Issue 5137047: Fix memory corruption in ANGLE shader translator. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by zmo
Modified:
13 years, 11 months ago
Reviewers:
kbr1, kbr
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fix memory corruption in ANGLE shader translator. The bug is that within each compilation cycle, all the memory allocated through T* types are freed to be reused. So if certain information is meant to outlive the cycle, it should use the std type instead of the T* type: 1) emulated function vector 2) mapped long names map BUG=none TEST=webgl conformance test conformance/glsl/glsl-feature-mod-gentype.html does not crash in Win Debug. Committed: http://code.google.com/p/angleproject/source/detail?r=773

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M src/compiler/BuiltInFunctionEmulator.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/MapLongVariableNames.h View 2 chunks +2 lines, -2 lines 1 comment Download
M src/compiler/MapLongVariableNames.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/compiler/ShHandle.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
Zhenyao Mo
Please review. (Please also let me know if you think this should be merged back ...
13 years, 11 months ago (2011-09-27 21:18:04 UTC) #1
kbr1
13 years, 11 months ago (2011-09-27 21:22:57 UTC) #2
LGTM. Yes, this should be backported to M15 and possibly earlier.

http://codereview.appspot.com/5137047/diff/1/src/compiler/MapLongVariableNames.h
File src/compiler/MapLongVariableNames.h (right):

http://codereview.appspot.com/5137047/diff/1/src/compiler/MapLongVariableName...
src/compiler/MapLongVariableNames.h:30: std::map<std::string, std::string>&
mVaryingLongNameMap;
A public "typedef std::map<std::string, std::string> StringMap" would shorten
the code a fair amount.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b