Bug Summary

File:src/gnu/usr.bin/binutils-2.17/obj/binutils/arparse.c
Warning:line 389, column 18
Use of zero-allocated memory

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple amd64-unknown-openbsd7.0 -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name arparse.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 1 -pic-is-pie -mframe-pointer=all -relaxed-aliasing -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature +retpoline-indirect-calls -target-feature +retpoline-indirect-branches -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/usr/src/gnu/usr.bin/binutils-2.17/obj/binutils -resource-dir /usr/local/lib/clang/13.0.0 -D HAVE_CONFIG_H -I . -I /usr/src/gnu/usr.bin/binutils-2.17/binutils -I . -D _GNU_SOURCE -I . -I /usr/src/gnu/usr.bin/binutils-2.17/binutils -I ../bfd -I /usr/src/gnu/usr.bin/binutils-2.17/binutils/../bfd -I /usr/src/gnu/usr.bin/binutils-2.17/binutils/../include -I /usr/src/gnu/usr.bin/binutils-2.17/binutils/../intl -I ../intl -D LOCALEDIR="/usr/share/locale" -D bin_dummy_emulation=bin_vanilla_emulation -D PIE_DEFAULT=1 -internal-isystem /usr/local/lib/clang/13.0.0/include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir=/usr/src/gnu/usr.bin/binutils-2.17/obj/binutils -ferror-limit 19 -fwrapv -D_RET_PROTECTOR -ret-protector -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -fno-builtin-strdup -fno-builtin-strndup -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/ben/Projects/vmm/scan-build/2022-01-12-194120-40624-1 -x c arparse.c
1#include <stdlib.h>
2#include <string.h>
3#define YYBYACC1 1
4#define YYMAJOR1 1
5#define YYMINOR9 9
6#define YYLEXyylex() yylex()
7#define YYEMPTY-1 -1
8#define yyclearin(yychar=(-1)) (yychar=(YYEMPTY-1))
9#define yyerrok(yyerrflag=0) (yyerrflag=0)
10#define YYRECOVERING()(yyerrflag!=0) (yyerrflag!=0)
11#define YYPREFIX"yy" "yy"
12#line 2 "arparse.y"
13/* arparse.y - Stange script language parser */
14
15/* Copyright 1992, 1993, 1995, 1997, 1999, 2002, 2003
16 Free Software Foundation, Inc.
17
18This file is part of GNU Binutils.
19
20This program is free software; you can redistribute it and/or modify
21it under the terms of the GNU General Public License as published by
22the Free Software Foundation; either version 2 of the License, or
23(at your option) any later version.
24
25This program is distributed in the hope that it will be useful,
26but WITHOUT ANY WARRANTY; without even the implied warranty of
27MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28GNU General Public License for more details.
29
30You should have received a copy of the GNU General Public License
31along with this program; if not, write to the Free Software
32Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
33
34
35/* Contributed by Steve Chamberlain
36 sac@cygnus.com
37
38*/
39#define DONTDECLARE_MALLOC
40#include "bfd.h"
41#include "bucomm.h"
42#include "arsup.h"
43extern int verbose;
44extern int yylex (void);
45static int yyerror (const char *);
46#line 37 "arparse.y"
47#ifndef YYSTYPE_DEFINED
48#define YYSTYPE_DEFINED
49typedef union {
50 char *name;
51struct list *list ;
52
53} YYSTYPE;
54#endif /* YYSTYPE_DEFINED */
55#line 56 "arparse.c"
56#define NEWLINE257 257
57#define VERBOSE258 258
58#define FILENAME259 259
59#define ADDLIB260 260
60#define LIST261 261
61#define ADDMOD262 262
62#define CLEAR263 263
63#define CREATE264 264
64#define DELETE265 265
65#define DIRECTORY266 266
66#define END267 267
67#define EXTRACT268 268
68#define FULLDIR269 269
69#define HELP270 270
70#define QUIT271 271
71#define REPLACE272 272
72#define SAVE273 273
73#define OPEN274 274
74#define YYERRCODE256 256
75const short yylhs[] =
76 { -1,
77 5, 0, 4, 4, 6, 7, 7, 7, 7, 7,
78 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
79 7, 16, 17, 13, 18, 14, 19, 15, 8, 9,
80 12, 11, 3, 3, 1, 1, 2, 2, 20, 20,
81 10,
82};
83const short yylen[] =
84 { 2,
85 0, 2, 2, 0, 2, 1, 1, 1, 1, 1,
86 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
87 0, 2, 2, 1, 2, 2, 1, 1, 2, 2,
88 3, 4, 1, 0, 3, 0, 3, 0, 1, 0,
89 1,
90};
91const short yydefred[] =
92 { 1,
93 0, 4, 0, 19, 41, 20, 0, 27, 38, 24,
94 0, 38, 0, 18, 38, 38, 28, 0, 3, 0,
95 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
96 16, 17, 0, 0, 30, 0, 0, 0, 0, 29,
97 5, 38, 31, 39, 0, 0, 0, 37, 33, 32,
98 35,
99};
100const short yydgoto[] =
101 { 1,
102 43, 34, 50, 3, 2, 19, 20, 21, 22, 23,
103 24, 25, 26, 27, 28, 29, 30, 31, 32, 45,
104};
105const short yysindex[] =
106 { 0,
107 0, 0, -251, 0, 0, 0, -257, 0, 0, 0,
108 -253, 0, -240, 0, 0, 0, 0, -234, 0, -221,
109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
110 0, 0, -3, -6, 0, -6, -3, -6, -6, 0,
111 0, 0, 0, 0, -220, -219, -17, 0, 0, 0,
112 0,};
113const short yyrindex[] =
114 { 0,
115 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
118 0, 0, -216, -239, 0, -231, -228, -225, -224, 0,
119 0, 0, 0, 0, 0, -215, -234, 0, 0, 0,
120 0,};
121const short yygindex[] =
122 { 0,
123 6, -12, 0, 0, 0, 0, 0, 0, 0, 0,
124 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
125};
126#define YYTABLESIZE258 258
127const short yytable[] =
128 { 36,
129 2, 33, 38, 39, 4, 35, 5, 6, 7, 8,
130 9, 10, 11, 12, 13, 14, 15, 26, 37, 40,
131 16, 17, 18, 51, 40, 25, 44, 40, 36, 47,
132 36, 22, 23, 40, 40, 41, 42, 44, 48, 49,
133 36, 34, 46, 0, 0, 0, 0, 0, 0, 0,
134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
154 0, 0, 0, 0, 0, 0, 0, 21,
155};
156const short yycheck[] =
157 { 12,
158 0, 259, 15, 16, 256, 259, 258, 259, 260, 261,
159 262, 263, 264, 265, 266, 267, 268, 257, 259, 259,
160 272, 273, 274, 41, 259, 257, 44, 259, 257, 42,
161 259, 257, 257, 259, 259, 257, 40, 44, 259, 259,
162 257, 257, 37, -1, -1, -1, -1, -1, -1, -1,
163 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
168 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
173 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
175 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
183 -1, -1, -1, -1, -1, -1, -1, 257,
184};
185#define YYFINAL1 1
186#ifndef YYDEBUG0
187#define YYDEBUG0 0
188#endif
189#define YYMAXTOKEN274 274
190#if YYDEBUG0
191const char * const yyname[] =
192 {
193"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1940,0,0,0,0,0,"'('","')'",0,0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1950,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1970,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1990,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"NEWLINE","VERBOSE",
200"FILENAME","ADDLIB","LIST","ADDMOD","CLEAR","CREATE","DELETE","DIRECTORY","END",
201"EXTRACT","FULLDIR","HELP","QUIT","REPLACE","SAVE","OPEN",
202};
203const char * const yyrule[] =
204 {"$accept : start",
205"$$1 :",
206"start : $$1 session",
207"session : session command_line",
208"session :",
209"command_line : command NEWLINE",
210"command : open_command",
211"command : create_command",
212"command : verbose_command",
213"command : directory_command",
214"command : addlib_command",
215"command : clear_command",
216"command : addmod_command",
217"command : save_command",
218"command : extract_command",
219"command : replace_command",
220"command : delete_command",
221"command : list_command",
222"command : END",
223"command : error",
224"command : FILENAME",
225"command :",
226"extract_command : EXTRACT modulename",
227"replace_command : REPLACE modulename",
228"clear_command : CLEAR",
229"delete_command : DELETE modulename",
230"addmod_command : ADDMOD modulename",
231"list_command : LIST",
232"save_command : SAVE",
233"open_command : OPEN FILENAME",
234"create_command : CREATE FILENAME",
235"addlib_command : ADDLIB FILENAME modulelist",
236"directory_command : DIRECTORY FILENAME modulelist optional_filename",
237"optional_filename : FILENAME",
238"optional_filename :",
239"modulelist : '(' modulename ')'",
240"modulelist :",
241"modulename : modulename optcomma FILENAME",
242"modulename :",
243"optcomma : ','",
244"optcomma :",
245"verbose_command : VERBOSE",
246};
247#endif
248#ifdef YYSTACKSIZE10000
249#undef YYMAXDEPTH10000
250#define YYMAXDEPTH10000 YYSTACKSIZE10000
251#else
252#ifdef YYMAXDEPTH10000
253#define YYSTACKSIZE10000 YYMAXDEPTH10000
254#else
255#define YYSTACKSIZE10000 10000
256#define YYMAXDEPTH10000 10000
257#endif
258#endif
259#define YYINITSTACKSIZE200 200
260/* LINTUSED */
261int yydebug;
262int yynerrs;
263int yyerrflag;
264int yychar;
265short *yyssp;
266YYSTYPE *yyvsp;
267YYSTYPE yyval;
268YYSTYPE yylval;
269short *yyss;
270short *yysslim;
271YYSTYPE *yyvs;
272unsigned int yystacksize;
273int yyparse(void);
274#line 195 "arparse.y"
275
276static int
277yyerror (const char *x ATTRIBUTE_UNUSED__attribute__ ((__unused__)))
278{
279 extern int linenumber;
280
281 printf (_("Syntax error in archive script, line %d\n")("Syntax error in archive script, line %d\n"), linenumber + 1);
282 return 0;
283}
284#line 277 "arparse.c"
285/* allocate initial stack or double stack size, up to YYMAXDEPTH */
286static int yygrowstack(void)
287{
288 unsigned int newsize;
289 long sslen;
290 short *newss;
291 YYSTYPE *newvs;
292
293 if ((newsize = yystacksize) == 0)
28
Assuming the condition is false
29
Taking false branch
294 newsize = YYINITSTACKSIZE200;
295 else if (newsize >= YYMAXDEPTH10000)
30
Assuming 'newsize' is < YYMAXDEPTH
31
Taking false branch
296 return -1;
297 else if ((newsize *= 2) > YYMAXDEPTH10000)
32
Assuming the condition is false
33
Taking false branch
298 newsize = YYMAXDEPTH10000;
299 sslen = yyssp - yyss;
300#ifdef SIZE_MAX
301#define YY_SIZE_MAX0xffffffffU SIZE_MAX
302#else
303#define YY_SIZE_MAX0xffffffffU 0xffffffffU
304#endif
305 if (newsize && YY_SIZE_MAX0xffffffffU / newsize < sizeof *newss)
34
Assuming 'newsize' is 0
306 goto bail;
307 newss = (short *)realloc(yyss, newsize * sizeof *newss);
308 if (newss == NULL((void *)0))
35
Assuming 'newss' is not equal to NULL
36
Taking false branch
309 goto bail;
310 yyss = newss;
311 yyssp = newss + sslen;
312 if (newsize
36.1
'newsize' is 0
&& YY_SIZE_MAX0xffffffffU / newsize < sizeof *newvs)
313 goto bail;
314 newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs);
315 if (newvs == NULL((void *)0))
37
Assuming 'newvs' is not equal to NULL
38
Taking false branch
316 goto bail;
317 yyvs = newvs;
318 yyvsp = newvs + sslen;
319 yystacksize = newsize;
320 yysslim = yyss + newsize - 1;
321 return 0;
322bail:
323 if (yyss)
324 free(yyss);
325 if (yyvs)
326 free(yyvs);
327 yyss = yyssp = NULL((void *)0);
328 yyvs = yyvsp = NULL((void *)0);
329 yystacksize = 0;
330 return -1;
331}
332
333#define YYABORTgoto yyabort goto yyabort
334#define YYREJECTgoto yyabort goto yyabort
335#define YYACCEPTgoto yyaccept goto yyaccept
336#define YYERRORgoto yyerrlab goto yyerrlab
337int
338yyparse(void)
339{
340 int yym, yyn, yystate;
341#if YYDEBUG0
342 const char *yys;
343
344 if ((yys = getenv("YYDEBUG")))
345 {
346 yyn = *yys;
347 if (yyn >= '0' && yyn <= '9')
348 yydebug = yyn - '0';
349 }
350#endif /* YYDEBUG */
351
352 yynerrs = 0;
353 yyerrflag = 0;
354 yychar = (-1);
355
356 if (yyss == NULL((void *)0) && yygrowstack()) goto yyoverflow;
1
Assuming 'yyss' is not equal to NULL
357 yyssp = yyss;
358 yyvsp = yyvs;
359 *yyssp = yystate = 0;
360
361yyloop:
362 if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
2
Taking true branch
3
Control jumps to line 469
11
Taking true branch
12
Control jumps to line 469
18
Taking false branch
363 if (yychar < 0)
19
Assuming 'yychar' is >= 0
20
Taking false branch
364 {
365 if ((yychar = yylex()) < 0) yychar = 0;
366#if YYDEBUG0
367 if (yydebug)
368 {
369 yys = 0;
370 if (yychar <= YYMAXTOKEN274) yys = yyname[yychar];
371 if (!yys) yys = "illegal-symbol";
372 printf("%sdebug: state %d, reading %d (%s)\n",
373 YYPREFIX"yy", yystate, yychar, yys);
374 }
375#endif
376 }
377 if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
21
Assuming 'yyn' is not equal to 0
22
Assuming the condition is true
25
Taking true branch
378 yyn <= YYTABLESIZE258 && yycheck[yyn] == yychar)
23
Assuming 'yyn' is <= YYTABLESIZE
24
Assuming the condition is true
379 {
380#if YYDEBUG0
381 if (yydebug)
382 printf("%sdebug: state %d, shifting to state %d\n",
383 YYPREFIX"yy", yystate, yytable[yyn]);
384#endif
385 if (yyssp >= yysslim && yygrowstack())
26
Assuming 'yyssp' is >= 'yysslim'
27
Calling 'yygrowstack'
39
Returning from 'yygrowstack'
40
Taking false branch
386 {
387 goto yyoverflow;
388 }
389 *++yyssp = yystate = yytable[yyn];
41
Use of zero-allocated memory
390 *++yyvsp = yylval;
391 yychar = (-1);
392 if (yyerrflag > 0) --yyerrflag;
393 goto yyloop;
394 }
395 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
396 yyn <= YYTABLESIZE258 && yycheck[yyn] == yychar)
397 {
398 yyn = yytable[yyn];
399 goto yyreduce;
400 }
401 if (yyerrflag) goto yyinrecovery;
402#if defined(__GNUC__4)
403 goto yynewerror;
404#endif
405yynewerror:
406 yyerror("syntax error");
407#if defined(__GNUC__4)
408 goto yyerrlab;
409#endif
410yyerrlab:
411 ++yynerrs;
412yyinrecovery:
413 if (yyerrflag < 3)
414 {
415 yyerrflag = 3;
416 for (;;)
417 {
418 if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE256) >= 0 &&
419 yyn <= YYTABLESIZE258 && yycheck[yyn] == YYERRCODE256)
420 {
421#if YYDEBUG0
422 if (yydebug)
423 printf("%sdebug: state %d, error recovery shifting\
424 to state %d\n", YYPREFIX"yy", *yyssp, yytable[yyn]);
425#endif
426 if (yyssp >= yysslim && yygrowstack())
427 {
428 goto yyoverflow;
429 }
430 *++yyssp = yystate = yytable[yyn];
431 *++yyvsp = yylval;
432 goto yyloop;
433 }
434 else
435 {
436#if YYDEBUG0
437 if (yydebug)
438 printf("%sdebug: error recovery discarding state %d\n",
439 YYPREFIX"yy", *yyssp);
440#endif
441 if (yyssp <= yyss) goto yyabort;
442 --yyssp;
443 --yyvsp;
444 }
445 }
446 }
447 else
448 {
449 if (yychar == 0) goto yyabort;
450#if YYDEBUG0
451 if (yydebug)
452 {
453 yys = 0;
454 if (yychar <= YYMAXTOKEN274) yys = yyname[yychar];
455 if (!yys) yys = "illegal-symbol";
456 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
457 YYPREFIX"yy", yystate, yychar, yys);
458 }
459#endif
460 yychar = (-1);
461 goto yyloop;
462 }
463yyreduce:
464#if YYDEBUG0
465 if (yydebug)
466 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
467 YYPREFIX"yy", yystate, yyn, yyrule[yyn]);
468#endif
469 yym = yylen[yyn];
470 if (yym
3.1
'yym' is 0
12.1
'yym' is 0
)
4
Taking false branch
13
Taking false branch
471 yyval = yyvsp[1-yym];
472 else
473 memset(&yyval, 0, sizeof yyval);
474 switch (yyn)
5
Control jumps to 'case 1:' at line 476
14
'Default' branch taken. Execution continues on line 570
475 {
476case 1:
477#line 68 "arparse.y"
478{ prompt(); }
479break;
6
Execution continues on line 570
480case 5:
481#line 77 "arparse.y"
482{ prompt(); }
483break;
484case 18:
485#line 93 "arparse.y"
486{ ar_end(); return 0; }
487break;
488case 20:
489#line 95 "arparse.y"
490{ yyerror("foo"); }
491break;
492case 22:
493#line 102 "arparse.y"
494{ ar_extract(yyvsp[0].list); }
495break;
496case 23:
497#line 107 "arparse.y"
498{ ar_replace(yyvsp[0].list); }
499break;
500case 24:
501#line 112 "arparse.y"
502{ ar_clear(); }
503break;
504case 25:
505#line 117 "arparse.y"
506{ ar_delete(yyvsp[0].list); }
507break;
508case 26:
509#line 121 "arparse.y"
510{ ar_addmod(yyvsp[0].list); }
511break;
512case 27:
513#line 126 "arparse.y"
514{ ar_list(); }
515break;
516case 28:
517#line 131 "arparse.y"
518{ ar_save(); }
519break;
520case 29:
521#line 138 "arparse.y"
522{ ar_open(yyvsp[0].name,0); }
523break;
524case 30:
525#line 143 "arparse.y"
526{ ar_open(yyvsp[0].name,1); }
527break;
528case 31:
529#line 149 "arparse.y"
530{ ar_addlib(yyvsp[-1].name,yyvsp[0].list); }
531break;
532case 32:
533#line 153 "arparse.y"
534{ ar_directory(yyvsp[-2].name, yyvsp[-1].list, yyvsp[0].name); }
535break;
536case 33:
537#line 160 "arparse.y"
538{ yyval.name = yyvsp[0].name; }
539break;
540case 34:
541#line 161 "arparse.y"
542{ yyval.name = 0; }
543break;
544case 35:
545#line 166 "arparse.y"
546{ yyval.list = yyvsp[-1].list; }
547break;
548case 36:
549#line 168 "arparse.y"
550{ yyval.list = 0; }
551break;
552case 37:
553#line 173 "arparse.y"
554{ struct list *n = (struct list *) malloc(sizeof(struct list));
555 n->next = yyvsp[-2].list;
556 n->name = yyvsp[0].name;
557 yyval.list = n;
558 }
559break;
560case 38:
561#line 178 "arparse.y"
562{ yyval.list = 0; }
563break;
564case 41:
565#line 190 "arparse.y"
566{ verbose = !verbose; }
567break;
568#line 561 "arparse.c"
569 }
570 yyssp -= yym;
571 yystate = *yyssp;
572 yyvsp -= yym;
573 yym = yylhs[yyn];
574 if (yystate
14.1
'yystate' is not equal to 0
== 0
&& yym == 0)
7
Assuming 'yystate' is not equal to 0
575 {
576#if YYDEBUG0
577 if (yydebug)
578 printf("%sdebug: after reduction, shifting from state 0 to\
579 state %d\n", YYPREFIX"yy", YYFINAL1);
580#endif
581 yystate = YYFINAL1;
582 *++yyssp = YYFINAL1;
583 *++yyvsp = yyval;
584 if (yychar < 0)
585 {
586 if ((yychar = yylex()) < 0) yychar = 0;
587#if YYDEBUG0
588 if (yydebug)
589 {
590 yys = 0;
591 if (yychar <= YYMAXTOKEN274) yys = yyname[yychar];
592 if (!yys) yys = "illegal-symbol";
593 printf("%sdebug: state %d, reading %d (%s)\n",
594 YYPREFIX"yy", YYFINAL1, yychar, yys);
595 }
596#endif
597 }
598 if (yychar == 0) goto yyaccept;
599 goto yyloop;
600 }
601 if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
8
Assuming 'yyn' is 0
15
Assuming 'yyn' is 0
602 yyn <= YYTABLESIZE258 && yycheck[yyn] == yystate)
603 yystate = yytable[yyn];
604 else
605 yystate = yydgoto[yym];
606#if YYDEBUG0
607 if (yydebug)
608 printf("%sdebug: after reduction, shifting from state %d \
609to state %d\n", YYPREFIX"yy", *yyssp, yystate);
610#endif
611 if (yyssp >= yysslim && yygrowstack())
9
Assuming 'yyssp' is < 'yysslim'
16
Assuming 'yyssp' is < 'yysslim'
612 {
613 goto yyoverflow;
614 }
615 *++yyssp = yystate;
616 *++yyvsp = yyval;
617 goto yyloop;
10
Control jumps to line 362
17
Control jumps to line 362
618yyoverflow:
619 yyerror("yacc stack overflow");
620yyabort:
621 if (yyss)
622 free(yyss);
623 if (yyvs)
624 free(yyvs);
625 yyss = yyssp = NULL((void *)0);
626 yyvs = yyvsp = NULL((void *)0);
627 yystacksize = 0;
628 return (1);
629yyaccept:
630 if (yyss)
631 free(yyss);
632 if (yyvs)
633 free(yyvs);
634 yyss = yyssp = NULL((void *)0);
635 yyvs = yyvsp = NULL((void *)0);
636 yystacksize = 0;
637 return (0);
638}