Mon, 04 Feb 2013 10:28:39 -0800
8007403: Incorrect format arguments in adlparse.cpp
Reviewed-by: kvn, twisti
src/share/vm/adlc/adlparse.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/adlc/adlparse.cpp Mon Feb 04 09:11:21 2013 +0100 1.2 +++ b/src/share/vm/adlc/adlparse.cpp Mon Feb 04 10:28:39 2013 -0800 1.3 @@ -168,7 +168,7 @@ 1.4 // Check for block delimiter 1.5 if ( (_curchar != '%') 1.6 || ( next_char(), (_curchar != '{')) ) { 1.7 - parse_err(SYNERR, "missing '%{' in instruction definition\n"); 1.8 + parse_err(SYNERR, "missing '%%{' in instruction definition\n"); 1.9 return; 1.10 } 1.11 next_char(); // Maintain the invariant 1.12 @@ -253,7 +253,7 @@ 1.13 } while(_curchar != '%'); 1.14 next_char(); 1.15 if (_curchar != '}') { 1.16 - parse_err(SYNERR, "missing '%}' in instruction definition\n"); 1.17 + parse_err(SYNERR, "missing '%%}' in instruction definition\n"); 1.18 return; 1.19 } 1.20 // Check for "Set" form of chain rule 1.21 @@ -423,7 +423,7 @@ 1.22 skipws(); 1.23 // Check for block delimiter 1.24 if ((_curchar != '%') || (*(_ptr+1) != '{')) { // If not open block 1.25 - parse_err(SYNERR, "missing '%c{' in operand definition\n","%"); 1.26 + parse_err(SYNERR, "missing '%%{' in operand definition\n"); 1.27 return; 1.28 } 1.29 next_char(); next_char(); // Skip over "%{" symbol 1.30 @@ -483,7 +483,7 @@ 1.31 } while(_curchar != '%'); 1.32 next_char(); 1.33 if (_curchar != '}') { 1.34 - parse_err(SYNERR, "missing '%}' in operand definition\n"); 1.35 + parse_err(SYNERR, "missing '%%}' in operand definition\n"); 1.36 return; 1.37 } 1.38 // Add operand to tail of operand list 1.39 @@ -1324,7 +1324,7 @@ 1.40 // Check for block delimiter 1.41 if ( (_curchar != '%') 1.42 || ( next_char(), (_curchar != '{')) ) { 1.43 - parse_err(SYNERR, "missing '%{' in pipeline definition\n"); 1.44 + parse_err(SYNERR, "missing '%%{' in pipeline definition\n"); 1.45 return; 1.46 } 1.47 next_char(); // Maintain the invariant 1.48 @@ -1341,7 +1341,7 @@ 1.49 skipws(); 1.50 if ( (_curchar != '%') 1.51 || ( next_char(), (_curchar != '{')) ) { 1.52 - parse_err(SYNERR, "expected '%{'\n"); 1.53 + parse_err(SYNERR, "expected '%%{'\n"); 1.54 return; 1.55 } 1.56 next_char(); skipws(); 1.57 @@ -1397,7 +1397,7 @@ 1.58 skipws(); 1.59 if ( (_curchar != '%') 1.60 || ( next_char(), (_curchar != '{')) ) { 1.61 - parse_err(SYNERR, "expected '%{'\n"); 1.62 + parse_err(SYNERR, "expected '%%{'\n"); 1.63 return; 1.64 } 1.65 next_char(); skipws(); 1.66 @@ -1586,7 +1586,7 @@ 1.67 1.68 if ( (_curchar != '%') 1.69 || ( next_char(), (_curchar != '}')) ) { 1.70 - parse_err(SYNERR, "expected '%}', found \"%c\"\n", _curchar); 1.71 + parse_err(SYNERR, "expected '%%}', found \"%c\"\n", _curchar); 1.72 } 1.73 next_char(); skipws(); 1.74 1.75 @@ -1612,7 +1612,7 @@ 1.76 1.77 next_char(); 1.78 if (_curchar != '}') { 1.79 - parse_err(SYNERR, "missing \"%}\" in pipeline definition\n"); 1.80 + parse_err(SYNERR, "missing \"%%}\" in pipeline definition\n"); 1.81 return; 1.82 } 1.83 1.84 @@ -1775,7 +1775,7 @@ 1.85 // Check for block delimiter 1.86 if ( (_curchar != '%') 1.87 || ( next_char(), (_curchar != '{')) ) { 1.88 - parse_err(SYNERR, "missing \"%{\" in pipe_class definition\n"); 1.89 + parse_err(SYNERR, "missing \"%%{\" in pipe_class definition\n"); 1.90 return; 1.91 } 1.92 next_char(); 1.93 @@ -2062,7 +2062,7 @@ 1.94 1.95 next_char(); 1.96 if (_curchar != '}') { 1.97 - parse_err(SYNERR, "missing \"%}\" in pipe_class definition\n"); 1.98 + parse_err(SYNERR, "missing \"%%}\" in pipe_class definition\n"); 1.99 return; 1.100 } 1.101 1.102 @@ -3341,12 +3341,12 @@ 1.103 char *disp = NULL; 1.104 1.105 if (_curchar != '%') { 1.106 - parse_err(SYNERR, "Missing '%{' for 'interface' block.\n"); 1.107 + parse_err(SYNERR, "Missing '%%{' for 'interface' block.\n"); 1.108 return NULL; 1.109 } 1.110 next_char(); // Skip '%' 1.111 if (_curchar != '{') { 1.112 - parse_err(SYNERR, "Missing '%{' for 'interface' block.\n"); 1.113 + parse_err(SYNERR, "Missing '%%{' for 'interface' block.\n"); 1.114 return NULL; 1.115 } 1.116 next_char(); // Skip '{' 1.117 @@ -3354,7 +3354,7 @@ 1.118 do { 1.119 char *field = get_ident(); 1.120 if (field == NULL) { 1.121 - parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n"); 1.122 + parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n"); 1.123 return NULL; 1.124 } 1.125 if ( strcmp(field,"base") == 0 ) { 1.126 @@ -3370,13 +3370,13 @@ 1.127 disp = interface_field_parse(); 1.128 } 1.129 else { 1.130 - parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n"); 1.131 + parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n"); 1.132 return NULL; 1.133 } 1.134 } while( _curchar != '%' ); 1.135 next_char(); // Skip '%' 1.136 if ( _curchar != '}' ) { 1.137 - parse_err(SYNERR, "Missing '%}' for 'interface' block.\n"); 1.138 + parse_err(SYNERR, "Missing '%%}' for 'interface' block.\n"); 1.139 return NULL; 1.140 } 1.141 next_char(); // Skip '}' 1.142 @@ -3403,12 +3403,12 @@ 1.143 const char *greater_format = "gt"; 1.144 1.145 if (_curchar != '%') { 1.146 - parse_err(SYNERR, "Missing '%{' for 'cond_interface' block.\n"); 1.147 + parse_err(SYNERR, "Missing '%%{' for 'cond_interface' block.\n"); 1.148 return NULL; 1.149 } 1.150 next_char(); // Skip '%' 1.151 if (_curchar != '{') { 1.152 - parse_err(SYNERR, "Missing '%{' for 'cond_interface' block.\n"); 1.153 + parse_err(SYNERR, "Missing '%%{' for 'cond_interface' block.\n"); 1.154 return NULL; 1.155 } 1.156 next_char(); // Skip '{' 1.157 @@ -3416,7 +3416,7 @@ 1.158 do { 1.159 char *field = get_ident(); 1.160 if (field == NULL) { 1.161 - parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n"); 1.162 + parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n"); 1.163 return NULL; 1.164 } 1.165 if ( strcmp(field,"equal") == 0 ) { 1.166 @@ -3438,13 +3438,13 @@ 1.167 greater = interface_field_parse(&greater_format); 1.168 } 1.169 else { 1.170 - parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%}' ending interface.\n"); 1.171 + parse_err(SYNERR, "Expected keyword, base|index|scale|disp, or '%%}' ending interface.\n"); 1.172 return NULL; 1.173 } 1.174 } while( _curchar != '%' ); 1.175 next_char(); // Skip '%' 1.176 if ( _curchar != '}' ) { 1.177 - parse_err(SYNERR, "Missing '%}' for 'interface' block.\n"); 1.178 + parse_err(SYNERR, "Missing '%%}' for 'interface' block.\n"); 1.179 return NULL; 1.180 } 1.181 next_char(); // Skip '}' 1.182 @@ -3543,7 +3543,7 @@ 1.183 } 1.184 else if ((cnstr = find_cpp_block("match constructor")) == NULL ) { 1.185 parse_err(SYNERR, "invalid construction of match rule\n" 1.186 - "Missing ';' or invalid '%{' and '%}' constructor\n"); 1.187 + "Missing ';' or invalid '%%{' and '%%}' constructor\n"); 1.188 return NULL; // No MatchRule to return 1.189 } 1.190 if (_AD._adl_debug > 1) 1.191 @@ -3646,7 +3646,7 @@ 1.192 // Check for closing '"' and '%}' in format description 1.193 skipws(); // Move to closing '%}' 1.194 if ( _curchar != '%' ) { 1.195 - parse_err(SYNERR, "non-blank characters between closing '\"' and '%' in format"); 1.196 + parse_err(SYNERR, "non-blank characters between closing '\"' and '%%' in format"); 1.197 return NULL; 1.198 } 1.199 } // Done with format description inside 1.200 @@ -3654,7 +3654,7 @@ 1.201 skipws(); 1.202 // Past format description, at '%' 1.203 if ( _curchar != '%' || *(_ptr+1) != '}' ) { 1.204 - parse_err(SYNERR, "missing '%}' at end of format block"); 1.205 + parse_err(SYNERR, "missing '%%}' at end of format block"); 1.206 return NULL; 1.207 } 1.208 next_char(); // Move past the '%' 1.209 @@ -3785,7 +3785,7 @@ 1.210 skipws(); 1.211 // Past format description, at '%' 1.212 if ( _curchar != '%' || *(_ptr+1) != '}' ) { 1.213 - parse_err(SYNERR, "missing '%}' at end of format block"); 1.214 + parse_err(SYNERR, "missing '%%}' at end of format block"); 1.215 return NULL; 1.216 } 1.217 next_char(); // Move past the '%' 1.218 @@ -3834,7 +3834,7 @@ 1.219 skipws(); // Skip leading whitespace 1.220 if ((_curchar != '%') 1.221 || (next_char(), (_curchar != '{')) ) { // If not open block 1.222 - parse_err(SYNERR, "missing '%{' in expand definition\n"); 1.223 + parse_err(SYNERR, "missing '%%{' in expand definition\n"); 1.224 return(NULL); 1.225 } 1.226 next_char(); // Maintain the invariant 1.227 @@ -3933,7 +3933,7 @@ 1.228 } while(_curchar != '%'); 1.229 next_char(); 1.230 if (_curchar != '}') { 1.231 - parse_err(SYNERR, "missing '%}' in expand rule definition\n"); 1.232 + parse_err(SYNERR, "missing '%%}' in expand rule definition\n"); 1.233 return(NULL); 1.234 } 1.235 next_char();