cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
636 stars 18 forks source link

P2414 R4 Pointer lifetime-end zap proposed solutions #1084

Open wg21bot opened 3 years ago

wg21bot commented 3 years ago

P2414R0 Pointer lifetime-end zap proposed solutions (Paul E. McKenney, Maged Michael, Jens Maurer, Peter Sewell, Martin Uecker, Hans Boehm, Hubert Tong, Niall Douglas, Thomas Rodgers, Will Deacon, Michael Wong, David Goldblatt, Kostya Serebryany, and Anthony Williams.)

wg21bot commented 3 years ago

P2414R1 Pointer lifetime-end zap proposed solutions (Paul E. McKenney, Maged Michael, Jens Maurer, Peter Sewell, Martin Uecker, Hans Boehm, Hubert Tong, Niall Douglas, Thomas Rodgers, Will Deacon, Michael Wong, David Goldblatt, Kostya Serebryany, and Anthony Williams.)

erichkeane commented 2 years ago

P1726(#553) and P2188 (#895) both were sent to SG1/SG12 to get clarity on our overall direction. It appears this paper might be said overall direction, however I'd like to see SG1 and SG12 see this before EWG.

jfbastien commented 2 years ago

The paper was seen at the 2021-09-01 EWG telecon

POLL: we encourage more work in the direction proposed in P2414R1, including creating an implementation, getting implementor feedback, figuring out issues with type punning in the proposed API, and writing wording.

SF F N A SA 3 6 0 0 0

wg21bot commented 9 months ago

P2414R2 Pointer lifetime-end zap proposed solutions (Paul E. McKenney, Maged Michael, Jens Maurer, Peter Sewell, Martin Uecker, Hans Boehm, Hubert Tong, Niall Douglas, Thomas Rodgers, Will Deacon, Michael Wong, David Goldblatt, Kostya Serebryany, and Anthony Williams.)

jfbastien commented 6 months ago

Seen in Tokyo EWG on Friday

EWG encourages authors to do more work on the proposal.

SF F N A SA 2 6 4 1 0

wg21bot commented 5 months ago

P2414R3 Pointer lifetime-end zap proposed solutions (Paul E. McKenney, Maged Michael, Jens Maurer, Peter Sewell, Martin Uecker, Hans Boehm, Hubert Tong, Niall Douglas, Thomas Rodgers, Will Deacon, Michael Wong, David Goldblatt, Kostya Serebryany, Anthony Williams, Tom Scogland, and JF Bastien)

ogiroux commented 3 months ago

SG1 in St Louis

Polls:

We agree that Angelic nondeterminism has slain the zap but has usability problems that we want to address SF F N A SA 3 7 2 1 0 Consensus A: I'm not convinced that it's going to survive contact with impl. F: some of us agree with that concern

We want to address this (1 at a time) usability issue:

  1. Atomic<T> should do the right thing automatically (pointers returned from atomic<T> have angelic nondeterminism applied to them without user doing it) SF F N A SA 5 2 3 1 0 Consensus A: it might have some performance implications we don't know about

  2. Volatile T* should do the right thing automatically SF F N A SA 4 4 4 0 0 Consensus

  3. realloc should do the right thing automatically?????? SF F N A SA Withdrawn

  4. Function (make_ptr_usable / launder_provenance) should exist that does the double reinterpret_cast SF F N A SA 2 8 0 0 0 Consensus

  5. Class wrapper (usable_provenance_ptr) should exist that does the reinterpret_cast in and out SF F N A SA 2 2 5 1 0 A: I think the toolbox is deep enough at this point Consensus

  6. Arithmetic and load/store on invalid and prospective pointers is valid (this is understood to be implementation-defined today, this would make it defined) SF F N A SA Withdrawn, this needs an EWG paper on this specific question

wg21bot commented 1 month ago

P2414R4 Pointer lifetime-end zap proposed solutions (Paul E. McKenney, Maged Michael, Jens Maurer, Peter Sewell, Martin Uecker, Hans Boehm, Hubert Tong, Niall Douglas, Thomas Rodgers, Will Deacon, Michael Wong, David Goldblatt, Kostya Serebryany, Anthony Williams, Tom Scogland, and JF Bastien)