~ubuntu-branches/ubuntu/precise/mesa/precise-security

« back to all changes in this revision

Viewing changes to src/glsl/loop_analysis.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers, Steve Beattie
  • Date: 2012-10-19 09:04:04 UTC
  • mfrom: (163.1.4 precise-proposed)
  • Revision ID: package-import@ubuntu.com-20121019090404-5zbjpsp6knv7zl3b
Tags: 8.0.4-0ubuntu0.2
[ Steve Beattie ]
* SECURITY UPDATE: samplers array overflow (LP: #1046933)
  - debian/patches/50-CVE-2012-2864.patch: ensure that more than
    MAX_SAMPLERS are not used
  - CVE-2012-2864

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    */
123
123
   unsigned num_loop_jumps;
124
124
 
 
125
   /**
 
126
    * Whether this loop contains any function calls.
 
127
    */
 
128
   bool contains_calls;
 
129
 
125
130
   loop_variable_state()
126
131
   {
127
132
      this->max_iterations = -1;
128
133
      this->num_loop_jumps = 0;
 
134
      this->contains_calls = false;
129
135
      this->var_hash = hash_table_ctor(0, hash_table_pointer_hash,
130
136
                                       hash_table_pointer_compare);
131
137
   }
134
140
   {
135
141
      hash_table_dtor(this->var_hash);
136
142
   }
 
143
 
 
144
   static void* operator new(size_t size, void *ctx)
 
145
   {
 
146
      void *lvs = ralloc_size(ctx, size);
 
147
      assert(lvs != NULL);
 
148
 
 
149
      ralloc_set_destructor(lvs, (void (*)(void*)) destructor);
 
150
 
 
151
      return lvs;
 
152
   }
 
153
 
 
154
private:
 
155
   static void
 
156
   destructor(loop_variable_state *lvs)
 
157
   {
 
158
      lvs->~loop_variable_state();
 
159
   }
137
160
};
138
161
 
139
162