ice icon indicating copy to clipboard operation
ice copied to clipboard

Small bug in C++ user exception marshaling

Open bernardnormier opened this issue 1 year ago • 1 comments

In Ice 3.7, user exceptions are marshaled using a helper template, in particular, with this call: https://github.com/zeroc-ice/ice/blob/8a1557ee2fbdd3b2a75f12a224ebfb0cd66ed090/cpp/include/Ice/ExceptionHelpers.h#L54

The last parameter indicates whether the current exception slice is the last slice (true) or not. The test should be against Ice::UserException, not Ice::LocalException. This has no effect on the 1.0 encoding. With the 1.1 encoding, we don't encode "last slice" ever for user exceptions:

https://github.com/zeroc-ice/ice/blob/8a1557ee2fbdd3b2a75f12a224ebfb0cd66ed090/cpp/src/Ice/OutputStream.cpp#L1165

The effect on decoding is not clear: https://github.com/zeroc-ice/ice/blob/8a1557ee2fbdd3b2a75f12a224ebfb0cd66ed090/cpp/src/Ice/InputStream.cpp#L2354

bernardnormier avatar Mar 14 '24 20:03 bernardnormier

3.8: fixed by #1937.

bernardnormier avatar Mar 14 '24 21:03 bernardnormier