Summary: | Locate Forward with out sequences causes server to segv | ||
---|---|---|---|
Product: | TAO | Reporter: | Heather Drury <drury_h> |
Component: | IDL Compiler | Assignee: | Dale Wilson <wilson_d> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cleeland, drury_h, wilson_d |
Priority: | P3 | ||
Version: | 1.3.5 | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 1676 | ||
Bug Blocks: | 1638 | ||
Attachments: | idl code that illustrates the problem |
Description
Heather Drury
2003-12-08 09:59:35 CST
Created attachment 245 [details]
idl code that illustrates the problem
Is OCI having a fix for this? Pending OCI's reply to Bala's last comment, we will address this issue when we tackle the generated code refactoring for the skeleton side. I have a fix for this one, but I haven't finished testing it yet. If it passes, I'll check it in when the repo is open for checkins. The fix is in TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp. It needs to generate an if to skip the marshalling code if TAO_HAS_INTERCEPTORS and this is a location forward. Dale Dale, please add your patches to the bugzilla. We can integrate it as soon as the beta is out of the door. I think you are on the right track. Adda test case for this. Anyway, during the next stage of refactoring we will have to clean this up. Talking of this, Jeff we have a problem here irrespective of LF. Marshalling a sequence of strings which are not initialized seems to be a problem. We need that fixed. Let me double check that and probably add a bugzilla entry if required. Dale, I just registered a new bugzilla entry. I think 1676 is "the" bug to fix, and this would get resolved automatically. Nevertheless your patches shuld be useful too The patch: Index: operation_ss.cpp =================================================================== RCS file: /project/cvs-repository/ACE_wrappers- repository/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp,v retrieving revision 1.77 diff -r1.77 operation_ss.cpp 680a681,686 > // Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" << be_nl > << "if (!_tao_vfr.location_forwarded ())" << be_idt_nl > << "{" << be_idt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */"<< be_nl; > 684a691 > // begin: marshal code 737a745,755 > > // end of indent: marshal code > *os << be_uidt << be_uidt; > > // End of scope: Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1) > << be_uidt_nl << "}" << be_uidt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */" << be_nl; I also have a test program that I'll check in eventually. ------------------------------ Bala, I disagree that fixing 1676 fixes this bug. 1676 addresses the issue of an uninitialized out parameter or return value. While I agree that SEGV is not a very good error message for this case, the correct action is to throw a MARSHAL exception. The application program has provided un-marshable data. (I'll add a note to that effect to that bugzilla entry) If 1676 were fixed correctly, but this fix not applied, then a location forward from a portable interceptor would trigger a MARSHAL exception which is not the desired behavior. Dale oops, I did a little last minute code-polishing before generating the diff. Add a closing quote at the end of the line: > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1) to make it > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" Dale Dale, coudl you please generate a new diff again? It woudl make my life easier. Please see bug 1676 for my replies to your osbervation Revised diff: Index: operation_ss.cpp =================================================================== RCS file: /project/cvs-repository/ACE_wrappers- repository/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp,v retrieving revision 1.77 diff -r1.77 operation_ss.cpp 680a681,686 > // Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" << be_nl > << "if (!_tao_vfr.location_forwarded ())" << be_idt_nl > << "{" << be_idt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */"<< be_nl; > 684a691 > // begin: marshal code 737a745,755 > > // end of indent: marshal code > *os << be_uidt << be_uidt; > > // End of scope: Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" > << be_uidt_nl << "}" << be_uidt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */" << be_nl; > > > I'll go ahead and check in this change. It's been working at OCI for a week. Fix is checked in. I still need to clean up and check in the regression test. Fixed already Sun Dec 28 09:55:44 2003 Dale Wilson <wilson_d@ociweb.com> |