diff options
author | qining <qining@google.com> | 2016-01-29 12:09:34 -0500 |
---|---|---|
committer | David Neto <dneto@google.com> | 2016-01-29 16:44:43 -0500 |
commit | 7dbfdda60962f5df77c9d13d85766cefaef3a02f (patch) | |
tree | b6d1fdabe36ec63a46d4cbf9cacea0424b6f3af6 /source/validate.h | |
parent | 8177fbea060e05f3fbe8024fd7844c60e73ce5d1 (diff) | |
download | SPIRV-Tools-7dbfdda60962f5df77c9d13d85766cefaef3a02f.tar.gz SPIRV-Tools-7dbfdda60962f5df77c9d13d85766cefaef3a02f.tar.bz2 SPIRV-Tools-7dbfdda60962f5df77c9d13d85766cefaef3a02f.zip |
Fix validator mem overflow when tracking capabilities
Diffstat (limited to 'source/validate.h')
-rw-r--r-- | source/validate.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/validate.h b/source/validate.h index b94fed25..4374410b 100644 --- a/source/validate.h +++ b/source/validate.h @@ -287,6 +287,9 @@ class ValidationState_t { Functions module_functions_; + // We are using vector to map the ID of the capability to its availability. + // The size of the vector needs to be the maximum ID plus one to cover the + // entire range of the capability. std::vector<bool> module_capabilities_; // Definitions and uses of all the IDs in the module. |