group_name has to be of <name> type as lex returns char*, not int. Type of non-terminal is given by the union:
%union { char *name; char chr; int val; struct cgroup_dictionary *values; } On some OS, when group_name is of type <val>, it segfaults on access to $2 (group_name) in the group rule: group : GROUP group_name '{' group_conf '}' This patch changes type of group_name from <val> to <name> Signed-off-by: Jan Chaloupka <jchal...@redhat.com> --- src/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse.y b/src/parse.y index 98f7699..e67ad54 100644 --- a/src/parse.y +++ b/src/parse.y @@ -45,9 +45,9 @@ int yywrap(void) int val; struct cgroup_dictionary *values; } -%type <name> ID DEFAULT +%type <name> ID DEFAULT group_name %type <val> mountvalue_conf mount task_namevalue_conf admin_namevalue_conf -%type <val> admin_conf task_conf task_or_admin group_conf group start group_name +%type <val> admin_conf task_conf task_or_admin group_conf group start %type <val> namespace namespace_conf default default_conf %type <values> namevalue_conf %type <val> template template_conf ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel