mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
bug #335: Solves seg fault in scheduler with empty strings
This commit is contained in:
parent
d7eaab77f1
commit
3448f86986
@ -1,9 +1,9 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -45,7 +45,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.4.2"
|
||||
#define YYBISON_VERSION "2.4.3"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -1243,7 +1243,7 @@ YYLTYPE yylloc;
|
||||
YYLTYPE *yylsp;
|
||||
|
||||
/* The locations where the error started and ended. */
|
||||
YYLTYPE yyerror_range[2];
|
||||
YYLTYPE yyerror_range[3];
|
||||
|
||||
YYSIZE_T yystacksize;
|
||||
|
||||
@ -1556,7 +1556,7 @@ yyreduce:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 137 "expr_bool.y"
|
||||
{float val;
|
||||
{ float val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val > (yyvsp[(3) - (3)].val_float);;}
|
||||
@ -1566,7 +1566,7 @@ yyreduce:
|
||||
|
||||
/* Line 1464 of yacc.c */
|
||||
#line 142 "expr_bool.y"
|
||||
{float val;
|
||||
{ float val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val < (yyvsp[(3) - (3)].val_float);;}
|
||||
@ -1579,7 +1579,7 @@ yyreduce:
|
||||
{ string val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (3)].val_str),val);
|
||||
(yyval.val_int) = val.empty() ? false :fnmatch((yyvsp[(3) - (3)].val_str), val.c_str(), 0) == 0;;}
|
||||
(yyval.val_int) = (val.empty() || (yyvsp[(3) - (3)].val_str)==0) ? false : fnmatch((yyvsp[(3) - (3)].val_str),val.c_str(),0)==0;;}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
@ -1589,7 +1589,7 @@ yyreduce:
|
||||
{ string val;
|
||||
|
||||
get_xml_attribute(oxml,(yyvsp[(1) - (4)].val_str),val);
|
||||
(yyval.val_int) = val.empty() ? false : fnmatch((yyvsp[(4) - (4)].val_str), val.c_str(), 0) != 0;;}
|
||||
(yyval.val_int) = (val.empty() || (yyvsp[(4) - (4)].val_str)==0) ? false : fnmatch((yyvsp[(4) - (4)].val_str),val.c_str(),0)!=0;;}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
@ -1695,7 +1695,7 @@ yyerrlab:
|
||||
#endif
|
||||
}
|
||||
|
||||
yyerror_range[0] = yylloc;
|
||||
yyerror_range[1] = yylloc;
|
||||
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
@ -1732,7 +1732,7 @@ yyerrorlab:
|
||||
if (/*CONSTCOND*/ 0)
|
||||
goto yyerrorlab;
|
||||
|
||||
yyerror_range[0] = yylsp[1-yylen];
|
||||
yyerror_range[1] = yylsp[1-yylen];
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYERROR. */
|
||||
YYPOPSTACK (yylen);
|
||||
@ -1766,7 +1766,7 @@ yyerrlab1:
|
||||
if (yyssp == yyss)
|
||||
YYABORT;
|
||||
|
||||
yyerror_range[0] = *yylsp;
|
||||
yyerror_range[1] = *yylsp;
|
||||
yydestruct ("Error: popping",
|
||||
yystos[yystate], yyvsp, yylsp, mc, oxml, result, error_msg);
|
||||
YYPOPSTACK (1);
|
||||
@ -1776,10 +1776,10 @@ yyerrlab1:
|
||||
|
||||
*++yyvsp = yylval;
|
||||
|
||||
yyerror_range[1] = yylloc;
|
||||
yyerror_range[2] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
the lookahead. YYLOC is available though. */
|
||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
||||
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||
*++yylsp = yyloc;
|
||||
|
||||
/* Shift the error token. */
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -134,12 +134,12 @@ expr: STRING '=' INTEGER { int val;
|
||||
get_xml_attribute(oxml,$1,val);
|
||||
$$ = val != $4;}
|
||||
|
||||
| STRING '>' FLOAT {float val;
|
||||
| STRING '>' FLOAT { float val;
|
||||
|
||||
get_xml_attribute(oxml,$1,val);
|
||||
$$ = val > $3;}
|
||||
|
||||
| STRING '<' FLOAT {float val;
|
||||
| STRING '<' FLOAT { float val;
|
||||
|
||||
get_xml_attribute(oxml,$1,val);
|
||||
$$ = val < $3;}
|
||||
@ -147,12 +147,12 @@ expr: STRING '=' INTEGER { int val;
|
||||
| STRING '=' STRING { string val;
|
||||
|
||||
get_xml_attribute(oxml,$1,val);
|
||||
$$ = val.empty() ? false :fnmatch($3, val.c_str(), 0) == 0;}
|
||||
$$ = (val.empty() || $3==0) ? false : fnmatch($3,val.c_str(),0)==0;}
|
||||
|
||||
| STRING '!''=' STRING { string val;
|
||||
|
||||
get_xml_attribute(oxml,$1,val);
|
||||
$$ = val.empty() ? false : fnmatch($4, val.c_str(), 0) != 0;}
|
||||
$$ = (val.empty() || $4==0) ? false : fnmatch($4,val.c_str(),0)!=0;}
|
||||
|
||||
| expr '&' expr { $$ = $1 && $3; }
|
||||
| expr '|' expr { $$ = $1 || $3; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user