https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
Bug 71945 depends on bug 121148, which changed state.
Bug 121148 Summary: Should use modular arithmetic for _Atomic_word
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148
What|Removed |Added
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
Bug 71945 depends on bug 121148, which changed state.
Bug 121148 Summary: Should use modular arithmetic for _Atomic_word
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148
What|Removed |Added
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
Jonathan Wakely changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #9 from GCC Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:9a2b1acda0cb2c32568b5ca82996eb0544a3a4ef
commit r16-3812-g9a2b1acda0cb2c32568b5ca82996eb0544a3a4ef
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
Bug 71945 depends on bug 121148, which changed state.
Bug 121148 Summary: Should use modular arithmetic for _Atomic_word
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148
What|Removed |Added
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #8 from GCC Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:faae3692f75003f5df226ed776d7386bf848dd00
commit r16-3811-gfaae3692f75003f5df226ed776d7386bf848dd00
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #7 from Jonathan Wakely ---
And the original code from comment 0 now does:
$ ./a.out
1) Create an object and pass it over to a shared pointer...
ptr.use_count() -> 1
2) Create an extra reference to that object...
ptr.use_count(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #6 from Jonathan Wakely ---
Simpler reproducer which fails the assertion with trunk when the ref count
overflows to INT_MIN, but which passes with my local patches:
#include
#include
#include
int main()
{
std::shared_ptr p(new
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #5 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #3)
> The __atomic_fetch_add built-in on signed integers is required to wrap like
> unsigned integers without UB, but we should check that all our
> target-specific
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #4 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #3)
> The __atomic_fetch_add built-in on signed integers is required to wrap like
> unsigned integers without UB, but we should check that all our
> target-specific
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|--- |16.0
Assignee|unassigned at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed||2025-01-23
Status|UNCONFIR
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945
--- Comment #1 from Jonathan Wakely ---
You also get undefined behaviour at 2bn objects when the signed _Atomic_word
overflows, and the weak count can also be forced to overflow. Doing so requires
allocating tens of GB of shared_ptr objects thoug
13 matches
Mail list logo