diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-06-01 19:26:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-01 19:26:34 +0200 |
commit | 0ba77d112ba62cd8846ce0bcacc909f83966f741 (patch) | |
tree | 9d3ff9f872cac4f8d67d7b0f9bc2e8828b38ac4f | |
parent | ca255ecc3e29d1ca2ae1d93374cee6f3e12d3b72 (diff) | |
parent | 4bb2475504a0f1b85d1358f8daeedb4c65f9f548 (diff) | |
download | ATCD-0ba77d112ba62cd8846ce0bcacc909f83966f741.tar.gz |
Merge pull request #634 from jwillemsen/jwi-fixissue570
Add fix and extended unit test for issue #570
-rw-r--r-- | TAO/TAO_IDL/util/utl_scope.cpp | 8 | ||||
-rw-r--r-- | TAO/tests/Bug_3845_Regression/issue570.idl | 4 | ||||
-rwxr-xr-x | TAO/tests/Bug_3845_Regression/run_test.pl | 11 |
3 files changed, 22 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp index 6a909093d90..f8b25ec0f32 100644 --- a/TAO/TAO_IDL/util/utl_scope.cpp +++ b/TAO/TAO_IDL/util/utl_scope.cpp @@ -1215,8 +1215,14 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, const bool global_scope_name = work->is_global_name (name); if (global_scope_name) { + // No tail, exit directly + UTL_List* tail = e->tail (); + if (!tail) + { + return 0; + } // Remove the preceeding "::" or "" from the scopename - e = static_cast<UTL_ScopedName *> (e->tail ()); + e = static_cast<UTL_ScopedName *> (tail); name = e->head (); // Move directly to the root scope diff --git a/TAO/tests/Bug_3845_Regression/issue570.idl b/TAO/tests/Bug_3845_Regression/issue570.idl new file mode 100644 index 00000000000..c688ed48102 --- /dev/null +++ b/TAO/tests/Bug_3845_Regression/issue570.idl @@ -0,0 +1,4 @@ +// Reproducer IDL for issue 570 +// https://github.com/DOCGroup/ACE_TAO/issues/570 + +struct X { _; }; diff --git a/TAO/tests/Bug_3845_Regression/run_test.pl b/TAO/tests/Bug_3845_Regression/run_test.pl index bc7adaddbbc..d02a4a7e147 100755 --- a/TAO/tests/Bug_3845_Regression/run_test.pl +++ b/TAO/tests/Bug_3845_Regression/run_test.pl @@ -28,6 +28,7 @@ $input_file1 = $server->LocalFile ("local_inarg.idl"); $input_file2 = $server->LocalFile ("local_inoutarg.idl"); $input_file3 = $server->LocalFile ("local_outarg.idl"); $input_file4 = $server->LocalFile ("local_rettype.idl"); +$input_file5 = $server->LocalFile ("issue570.idl"); # Compile the IDL $SV = $server->CreateProcess ("$tao_idl", "$input_file1"); @@ -49,6 +50,11 @@ $SV = $server->CreateProcess ("$tao_idl", "$input_file4"); $server_status4 = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); +# Compile the IDL +$SV = $server->CreateProcess ("$tao_idl", "$input_file5"); + +$server_status5 = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + open (STDOUT, ">&OLDOUT"); open (STDERR, ">&OLDERR"); @@ -72,4 +78,9 @@ if ($server_status4 == 0) { $status = 1; } +if ($server_status5 == 0) { + print STDERR "ERROR: tao_idl returned $server_status5 for $input_file5, should have failed\n"; + $status = 1; +} + exit $status; |