https://bugs.documentfoundation.org/show_bug.cgi?id=143450

            Bug ID: 143450
           Summary: Data corruption when returning small structs
                    containing a double from C++ via IPC
           Product: LibreOffice
           Version: 6.0.0.3 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I noticed data corruption of the double value in a small struct when returning
the struct as result via IPC.
struct XMyStruct {
  double field1;
  hyper field2;
}

interface XMyInterface {
  XMyStruct myMethod();
}

XMyStruct myMethod() {
  return XMyStruct(2.0, 3);
}

The integer member seems to be correctly transferred, but the double member
seems to be corrupt. If the struct contains two doubles or 2 hyper values, the
data is correct. If the order of the fields is changed (hyper first, then
double) both fields are corrupt.
Increasing the size of the struct, eg. by adding another double member fixes
the data corruption.

Steps to Reproduce:
Implement a C++ service, implementing XMyInterface as in description.
Implement a C++ client in a different process calling XMyInterface via IPC


Actual Results:
Observe that the values of the struct in C++ client are corrupted, depending on
the order of the double/hyper members in the struct.

Expected Results:
Struct members should be correct, regardless of their order.


Reproducible: Always


User Profile Reset: No



Additional Info:
I suggest Stephan Bergmann to take a look. I assume the bug is in the lowlevel
code near ./bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx, perhaps in
x86_64::fill_struct(...)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to