Bug 1413

Summary: ImplRepoC.cpp fails to compile
Product: TAO Reporter: storri
Component: Implementation RepositoryAssignee: DOC Center Support List (internal) <tao-support>
Status: CLOSED ---    
Severity: normal    
Priority: P3    
Version: 1.2.8   
Hardware: x86   
OS: Linux   

Description storri 2002-12-30 16:18:34 CST
make[3]: Entering directory `/home/shared/ACE_wrappers/TAO/tao/PortableServer'
g++ -W -Wall -Wpointer-arith -pipe  -fno-exceptions -fcheck-new -D_POSIX_THREADS
-D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -DACE_HAS_AIO_CALLS 
-I/home/shared/ACE_wrappers -DACE_NDEBUG -DACE_USE_RCSID=0
-DTAO_HAS_INTERCEPTORS=0    -I/home/shared/ACE_wrappers/TAO  -c  -o
.obj/ImplRepoC.o ImplRepoC.cpp
ImplRepoC.cpp: In member function `virtual char*
  
ImplementationRepository::_TAO_Administration_Remote_Proxy_Impl::activate_server_with_startup(CORBA_Object*,
   const char*, int, CORBA::Environment&)':
ImplRepoC.cpp:4087: return-statement with no value, in function declared with a
   non-void return type
ImplRepoC.cpp: In member function `virtual void
  
ImplementationRepository::_TAO_Administration_Remote_Proxy_Impl::shutdown_server(CORBA_Object*,
   const char*, CORBA::Environment&)':
ImplRepoC.cpp:4779: `_tao_retval' undeclared (first use this function)
ImplRepoC.cpp:4779: (Each undeclared identifier is reported only once for each
   function it appears in.)
ImplRepoC.cpp:4779: return-statement with a value, in function declared with a
   void return type
make[3]: *** [.obj/ImplRepoC.o] Error 1
make[3]: Leaving directory `/home/shared/ACE_wrappers/TAO/tao/PortableServer'
make[2]: *** [PortableServer.subdir] Error 2
make[2]: Leaving directory `/home/shared/ACE_wrappers/TAO/tao'
make[1]: *** [all.nested] Error 2
make[1]: Leaving directory `/home/shared/ACE_wrappers/TAO/tao'
make: *** [dirs] Error 2

This appears to be a IDL problem. There is a variable that _tao_retval is
undeclared.
Comment 1 Ossama Othman 2002-12-30 17:09:13 CST
Corrected component field.
Reassigned to tao-support.  Not mine.
Comment 2 Douglas C. Schmidt 2002-12-31 12:27:14 CST
Stephen, it looks like your workspace is out of date.  We build on this 
platform every day and have no problems.  Moreover, the problems you're seeing 
are coming from TAO IDL generated code, so it's almost certainly an 
inconsistency with your workspace.  Please try doing a "make realclean" and 
trying again from scratch.
Comment 3 storri 2002-12-31 14:25:33 CST
I did "make realclean" in the ACE_wrappers directory. This cleaned up everything
except for TAO. I did realclean in TAO and rebuild ace, gperf, TAO_IDL before
trying tao. I still failed at the same spot. So now I provide the configuration
files in the hope that I have been silly.

include/makeinclude/platform_macros.GNU:

debug=0
optimize=0
static_libs_only=1
interceptors=0
rtcorba=1
exceptions=0
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU


ace/config.h:
#define ACE_COMPILE_TIMEPROBES
#include "ace/config-linux.h"
Comment 4 Carlos O'Ryan 2002-12-31 15:11:16 CST
Looks like a real bug to me.  Triggered by your

interceptors=0

basically that changes the expansion of TAO_INTERCEPTOR_THROW() from an
ACE_TRY_CHECK to a real ACE_THROW, apparently the code in ImplRepoC.cpp was
incorrectly hand-crafted or generated with a version of the IDL compiler that
generated incorrect code for this case.

Comment 5 Nanbor Wang 2002-12-31 15:49:00 CST
Yes, its is a bug. Why doesnt our build that runs with interceptors disabled not
catch this? That is because exceptions have been turned off. 
Comment 6 Nanbor Wang 2002-12-31 15:52:02 CST
Pressed commit too early :(! The combination of exceptions turned off and
interceptors turned off created this problem and hid this from our daily builds. 
Comment 7 storri 2003-01-02 11:19:48 CST
Venkita provided this patch of what it took to get ImplRepoC.cpp to compile:

diff -u -r1.19 ImplRepoC.cpp
--- ImplRepoC.cpp       4 Sep 2002 18:31:34 -0000       1.19
+++ ImplRepoC.cpp       2 Jan 2003 16:52:57 -0000
@@ -4082,8 +4082,9 @@
 
           if (_invoke_status == TAO_INVOKE_EXCEPTION)
             {
-              TAO_INTERCEPTOR_THROW (
-                CORBA::UNKNOWN (CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES)
+              TAO_INTERCEPTOR_THROW_RETURN (
+                  CORBA::UNKNOWN (CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES),
+                  _tao_retval
               );
 
             }
@@ -4773,9 +4774,8 @@
 
           if (_invoke_status == TAO_INVOKE_EXCEPTION)
             {
-              TAO_INTERCEPTOR_THROW_RETURN (
-                CORBA::UNKNOWN (CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES),
-                _tao_retval
+              TAO_INTERCEPTOR_THROW (
+                CORBA::UNKNOWN (CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES)
               );
 
             }

So now the task that is left is to figure out why the tao_idl compiler does not
generate this same code.
Comment 8 Ossama Othman 2003-01-02 11:28:37 CST
Have you confirmed that it is a TAO_IDL compiler bug or whether the bug was
introduced during some handcrafting?
Comment 9 Boris Kolpackov 2003-01-02 11:29:31 CST
Fixed. See:
ChangeLogTag: Thu Jan  2 10:33:29 2003  Boris S Kolpackov
<boris@isis-server.isis.vanderbilt.edu>