Open jfbastien opened 2 years ago
EWG supports:
-users verifying that this model meets their needs, particularly for pointer zap -authors work with SG22 and WG14 to align C and C++ solutions -implementation experience be obtained -usage experience be obtained
then we want to see the paper again
SF | F | N | A | SA |
---|---|---|---|---|
10 | 8 | 1 | 0 | 0 |
Result: Consensus
link to P2434R0 is broken
The link looks fine, the paper just hasn't yet been published where the wg21 link bot can find it.
Related: #895 #553 #1084 #1011
@NinaRanns: Should this issue get an update from the SG22 discussion?
probably :) SG22 had a meeting to discuss the issue. WG14 felt the wording presented in P2434 doesn't solve the problem from WG14 perspective. The room didn't find a common way forward. Notes from the meeting can be found here
P2434r1 Nondeterministic pointer provenance: Expand the paper to specify the special angelic behavior on std::atomic<T*>
.
SF | F | N | A | SA |
---|---|---|---|---|
2 | 7 | 8 | 3 | 0 |
Not consensus (too many neutrals).
P2434R1 Nondeterministic pointer provenance: forward to SG1/CWG/LEWG for inclusion in C++26.
SF | F | N | A | SA |
---|---|---|---|---|
7 | 11 | 2 | 0 | 0 |
Consensus.
CWG 2024-06-25: Brief discussion on differences between WG14 (superimposed pointer values) and WG21 (angelic nondeterminism) approaches. Provenance of integers (and erasure thereof with arithmetic) mentioned.
CWG 2024-06-27 in St. Louis: Reviewed; needs updates.
SG1 believes that the approach of P2434R1 can address the zap problem with some additional (simpler) changes e.g.:
There is still an issue for the wording in this paper
A pointer value P is valid in the context of an evaluation E if P is a null pointer value, or if it is a pointer to or past the end of an object O and E happens after the beginning and happens before the end of the duration of the region of storage for O. […]
Consider this example:
int main(){
auto p = new int{0};
*p =10; // E
}
There is no deallocation in this program, so the expression E
happens before the end of the duration is unknown, in other words, Is the pointer valid when we leak the memory?
CWG 2024-11-22 in Wroclaw: CWG found the following example from the paper a rather surprising consequence for optimizers, and asks EWG to affirm this consequence is expressly acknowledged:
void f(T* p) {
T* t = new T();
if (opaque_fn(t)) {
// *t and *p can alias here
}
}
P2434R0 Nondeterministic pointer provenance (S. Davis Herring)