summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-12-08 15:22:04 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-12-08 15:22:04 +0000
commit7b9f9f33edb195d6748ec2a33c2e9ac370617e27 (patch)
tree31756b8b6f5abfb87716c9b0f7c561093783c75b
parenta40f19402b986bf4f30a664dad092b604808b246 (diff)
downloadATCD-7b9f9f33edb195d6748ec2a33c2e9ac370617e27.tar.gz
ChangeLogTag: Wed Dec 8 15:20:26 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog12
-rw-r--r--TAO/TAO_IDL/ast/ast_module.cpp2
-rw-r--r--TAO/TAO_IDL/fe/idl.yy8
-rw-r--r--TAO/TAO_IDL/fe/y.tab.cpp8
4 files changed, 28 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index a727efc0405..500caf0f20b 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Wed Dec 8 15:20:26 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_module.cpp:
+
+ Cosmetic changes.
+
+ * TAO_IDL/fe/y.tab.cpp:
+ * TAO_IDL/fe/idl.yy:
+
+ Added an exit if there is a an error produced in adding
+ a template module.
+
Wed Dec 8 12:36:06 UTC 2010 Martin Corino <corino_m@remedy.nl>
* TAO_IDL/be/be_visitor_component/component_ami_rh_ex_base.cpp:
diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp
index 9f1a102a1aa..910864ecd74 100644
--- a/TAO/TAO_IDL/ast/ast_module.cpp
+++ b/TAO/TAO_IDL/ast/ast_module.cpp
@@ -362,12 +362,14 @@ AST_Module::fe_add_module (AST_Module *t)
{
AST_Decl *parent = ScopeAsDecl (scope);
const char *prefix_holder = parent->prefix ();
+
if (!prefix_holder)
{
break; // We have reached global scope.
}
t->prefix (const_cast<char *> (prefix_holder));
+
if (ACE_OS::strcmp (t->prefix (), ""))
{
break;
diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy
index 4cbda09a25b..2f6f8605b97 100644
--- a/TAO/TAO_IDL/fe/idl.yy
+++ b/TAO/TAO_IDL/fe/idl.yy
@@ -633,8 +633,14 @@ template_module
$3);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
+ AST_Module *m = s->fe_add_module (tm);
- (void) s->fe_add_module (tm);
+ // We've probably tried to reopen a template module,
+ // going further will cause a crash.
+ if (m == 0)
+ {
+ return 1;
+ }
/*
* Push it on the stack
diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp
index f13585933f0..7df0eaa1301 100644
--- a/TAO/TAO_IDL/fe/y.tab.cpp
+++ b/TAO/TAO_IDL/fe/y.tab.cpp
@@ -2967,8 +2967,14 @@ tao_yyreduce:
(tao_yyvsp[(3) - (5)].plval));
UTL_Scope *s = idl_global->scopes ().top_non_null ();
+ AST_Module *m = s->fe_add_module (tm);
- (void) s->fe_add_module (tm);
+ // We've probably tried to reopen a template module,
+ // going further will cause a crash.
+ if (m == 0)
+ {
+ return 1;
+ }
/*
* Push it on the stack