A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue4129 below:

Possibly incorrect wording for data race avoidance

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

4129. Possibly incorrect wording for data race avoidance

Section: 16.4.6.10 [res.on.data.races] Status: New Submitter: Jiang An Opened: 2024-07-30 Last modified: 2024-08-03

Priority: Not Prioritized

View other active issues in [res.on.data.races].

View all other issues in [res.on.data.races].

View all issues with New status.

Discussion:

From PR cplusplus/draft#6748 which was closed as non-editorial.

Currently, 16.4.6.10 [res.on.data.races] is talking about arguments and "including this", but this is not a function argument. Moreover, it seems more appropriate to say that a function accesses some object via a parameter. It might need to be considered whether we should use the more general term "range" instead of "container", which will cover std::span, etc.

Proposed resolution:

This wording is relative to N4986.

  1. Modify 16.4.6.10 [res.on.data.races] as indicated:

    -2- A C++ standard library function shall not directly or indirectly access objects (6.10.2 [intro.multithread]) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function's arguments parameters, including this the object parameter (if any).

    -3- A C++ standard library function shall not directly or indirectly modify objects (6.10.2 [intro.multithread]) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function's non-const arguments parameters, including this the object parameter (if any). […] -5- A C++ standard library function shall not access objects indirectly accessible via its arguments parameters or via elements of its container arguments parameters except by invoking functions required by its specification on those container elements.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4