Ignore:
Timestamp:
Jul 22, 2015, 1:16:39 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, resolv-new, string, with_gc
Children:
18997b9, 7f5566b, b29f8f3, e766208
Parents:
994ec2c
Message:

fix segfault: error check for incorrect number of context parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r994ec2c r51b986f  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 16 16:10:02 2015
    13 // Update Count     : 189
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Jul 22 13:16:00 2015
     13// Update Count     : 194
    1414//
    1515
     
    404404                        } // for
    405405                } // for
     406
     407                if ( ctx->get_parameters().size() != contextInst->get_parameters().size() ) {
     408                        throw SemanticError( "incorrect number of context parameters: ", contextInst );
     409                } // if
     410
    406411                applySubstitution( ctx->get_parameters().begin(), ctx->get_parameters().end(), contextInst->get_parameters().begin(), ctx->get_members().begin(), ctx->get_members().end(), back_inserter( contextInst->get_members() ) );
    407412        }
Note: See TracChangeset for help on using the changeset viewer.