Bug 105218 - [ANGLE] Use of uninitialized memory in ArrayBoundsClamper
Summary: [ANGLE] Use of uninitialized memory in ArrayBoundsClamper
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Max Vujovic
URL:
Keywords:
Depends on: 98977
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-17 14:56 PST by Max Vujovic
Modified: 2012-12-21 17:45 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.61 KB, patch)
2012-12-17 15:08 PST, Max Vujovic
dino: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Patch (1.61 KB, patch)
2012-12-18 09:29 PST, Max Vujovic
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch (1.61 KB, patch)
2012-12-18 11:24 PST, Max Vujovic
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Vujovic 2012-12-17 14:56:50 PST
TIntermBinary::addIndexClamp is uninitialized when the compile flag SH_CLAMP_INDIRECT_ARRAY_BOUNDS is not set. Then, addIndexClamp is used in OutputGLSLBase. CSS Shaders needs to do a first validation pass without the SH_CLAMP_INDIRECT_ARRAY_BOUNDS flag and its effects. However, sometimes addIndexClamp is true, which inserts clamping code that causes the a shader to fail compilation at the WebGL level.

Patch coming up.
Comment 1 Max Vujovic 2012-12-17 15:08:17 PST
Created attachment 179808 [details]
Patch

Style bot never likes ANGLE changes, so please ignore her.
Comment 2 WebKit Review Bot 2012-12-17 15:09:47 PST
Attachment 179808 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/ThirdParty/ANGLE/ChangeLog', u'Sour..." exit_code: 1
Source/ThirdParty/ANGLE/src/compiler/intermediate.h:392:  Missing space inside { }.  [whitespace/braces] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dean Jackson 2012-12-17 15:27:38 PST
We should make sure this gets back to ANGLE.

Unfortunately I cannot contribute to ANGLE under its current license, but any code changes in WebKit are available under a BSD license. So Max, maybe you could contribute this and the original array clamper?
Comment 4 Max Vujovic 2012-12-17 15:36:11 PST
Thanks for the review!

(In reply to comment #3)
> We should make sure this gets back to ANGLE.
> 
> Unfortunately I cannot contribute to ANGLE under its current license, but any code changes in WebKit are available under a BSD license. So Max, maybe you could contribute this and the original array clamper?

Yes, definitely. I can do that.

If there's no hurry right now, I'll plan on doing it early January when I get back from holiday break.
Comment 5 Build Bot 2012-12-17 17:30:42 PST
Comment on attachment 179808 [details]
Patch

Attachment 179808 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15371922

New failing tests:
inspector/profiler/heap-snapshot.html
Comment 6 Max Vujovic 2012-12-18 09:29:13 PST
Created attachment 179960 [details]
Patch

EWS failure seems unrelated. Running it again to double check.
Comment 7 WebKit Review Bot 2012-12-18 09:32:48 PST
Attachment 179960 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/ThirdParty/ANGLE/ChangeLog', u'Sour..." exit_code: 1
Source/ThirdParty/ANGLE/src/compiler/intermediate.h:392:  Missing space inside { }.  [whitespace/braces] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Max Vujovic 2012-12-18 11:13:43 PST
Comment on attachment 179960 [details]
Patch

Bots are green. Setting cq+.
Comment 9 WebKit Review Bot 2012-12-18 11:16:36 PST
Comment on attachment 179960 [details]
Patch

Rejecting attachment 179960 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

/mnt/git/webkit-commit-queue/Source/ThirdParty/ANGLE/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/15418181
Comment 10 Max Vujovic 2012-12-18 11:24:30 PST
Created attachment 179983 [details]
Patch

Add reviewer entry in ChangeLog.
Comment 11 WebKit Review Bot 2012-12-18 11:27:39 PST
Attachment 179983 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/ThirdParty/ANGLE/ChangeLog', u'Sour..." exit_code: 1
Source/ThirdParty/ANGLE/src/compiler/intermediate.h:392:  Missing space inside { }.  [whitespace/braces] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 WebKit Review Bot 2012-12-18 11:48:27 PST
Comment on attachment 179983 [details]
Patch

Clearing flags on attachment: 179983

Committed r138048: <http://trac.webkit.org/changeset/138048>
Comment 13 WebKit Review Bot 2012-12-18 11:48:31 PST
All reviewed patches have been landed.  Closing bug.