Conversation
Some good progress on lifetime-end pointer zap and out-of-thin-air values in C++29! https://people.kernel.org/paulmck/c-pointer-zap-and-oota-progress
1
2
5

@paulmckrcu Have the semantic issues with angelic non-determinism been resolved?

1
0
0
@uecker If you are asking how this maps to the C-language ISO/IEC TS 6010, that is yet to be determined. I long ago resigned myself to different approaches for C++, C, and Rust.
1
0
0

@paulmckrcu No I mean whether it has clearly been defined what angelic non-determinism means semantically.

1
0
0
@uecker Define "clearly defined". ;-)

I would say "yes", but it is probably better to point you to this paper and let you decide: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2434r4.html

I would expect that this would not satisfy you, but perhaps the good news is that I expect that things will be more clear in the context of ISO/IEC TS 6010. It would still be the case that a pointer exposed concurrently with an access would use that pointer, though it might be possible to provide at least some limits on this.
1
0
0

@paulmckrcu You are right, I do not find this satisfying.

1
0
0
@uecker If it makes you feel any better, I do understand that a different approach to lifetime-end pointer zap will be required for the C language. Presumably something based on ISO/IEC TS 6010.
1
0
1

@paulmckrcu The problem is that C++ messing up their semantics usually also ends up hurting us in C, e.g. as for the time-travel UB which we never had but we still had to clarify this. But I guess I should be happy that C++ also moved away from this. But why can't they just simply take TS 6010 but instead they again try to be smarter than what is actually good for them.

1
0
0
@uecker Here is hoping that in the case of C, starting with TS 6010 will make things easier and more clearly defined.
1
0
0

@paulmckrcu I hope so, because I do not think TS 6010 being "overly charitable to the programmer" is a valid criticism. And while demons and angels playing game might be entertaining, I do not think it is good basis for any kind of useful technical specification - at least as long as the rules for the game remain ambiguous.

1
0
0
@uecker I apologize, but I really cannot resist suggesting that providing a way of cleanly supporting ABA-tolerant concurrent algorithms based on TS 6010 is a necessary (though probably not sufficient) step towards convincing WG21 of the value of this TS. ;-)
1
0
0

@paulmckrcu Why wouldn't the same solution work for TS 6010?

1
0
0
@uecker You lost me on this one. The same pointer-zap solution as adopted by WG21? If so, I am reviewing N3226 (a working draft that led to TS 6010) to attempt to produce an initial proposal. I could present that here, but I suspect that Mastodon isn't the best communications medium for this sort of thing. So left to myself, I would post to the SC22WG14. But is there a better venue?
0
0
0