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

Stephan Bergmann <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #6 from Stephan Bergmann <[email protected]> ---
(In reply to straub from comment #0)
> The m_nLastError member is written by reader and writer thread -> helgrind
> reports a data races. I'd suggest to use two separate members, one for read
> errors, one for write errors.

I assume you mean the oslSocketImpl::m_nLastError (sal/osl/unx/sockimpl.hxx)
member, as used in the sal/osl/unx/socket.cxx implementation of the
osl/socket.h functionality, and the reader and writer threads of the binary URP
implementation, binaryurp/source/{reader,writer}.hxx.

Splitting oslSocketImpl::m_nLastError would not be trivial, as there is only a
single osl_getLastSocketError function in the stable URE interface.

The reader/writer threads access the shared socket through a
css::connection::XConnection UNO object, implemented in
io/source/connector/ctr_socket.cxx.  The general requirement for UNO objects is
to be thread safe (for better or worse), so one could naively argue that that
implementation should take care of using its m_socket member in a way that
ensures that concurrent use of m_nLastError in the underlying socket
implementation cannot happen.  However, that would not work, as
osl_send/receiveSocket are blocking.

It looks like the osl/socket.h abstraction is broken.

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

Reply via email to