summaryrefslogtreecommitdiffstats
path: root/examples/corelib/ipc/doc/images
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-11-12 11:23:34 +0100
committerMarc Mutz <marc.mutz@qt.io>2025-11-21 07:58:10 +0100
commit4cff0183b48857174027fd27d05661e3bcab7c1d (patch)
tree54877f796eeec587d98fc12c2c951281de4007cf /examples/corelib/ipc/doc/images
parent76ea1a5730e160cf52723003c8de43f7f9a21388 (diff)
QArrayData: fix exception safety in assign()HEADdev
As mentioned at the top of assign(), the function ought to provide the basic exception guarantee. We were checking whether the construction of T from the result of the projection is noexcept, but, as Thiago pointed out in a related change, we ignored that the projection invocation can fail, too, in which case we'd leave a corrupt container around (size would not match the number of active objects in the list, holes in the middle if we started to use the prepend buffer, but failed in the middle). To fix, also check the projection for noexcept and fall back to the existing non-noexcept-construction paths in that case. It's pretty harmless, since the functionality isn't exposed in public API (if you consider QArrayData* non-public, that is), and the only user of projections was QString::assign(), and the projection it uses cannot throw (cf. f2ea9d8dc8dc8d52490722f78ea46cd374d8e649). Amends 782ccc6de5950ff1f6d3eeaaeacc7af4bc97a84f for the first hunk and e07710007b4cf9c0665ac9d5c2b6c7ef588aae0a for the second. Because of a massive code-move and -rewrite that has happened in dev, I decided that it's simpler to fix this in 6.10 and forward-port to dev, as it's one less conflict to resolve. Manual conflict resolution for dev: - dropped the original's second hunk, as that code is gone in dev Fixes: QTBUG-141899 Change-Id: I026f703e5245422dce2951fd733178b5a0a4eefe Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> (cherry picked from commit 73fa4cf2004690ae71ed9c41a93aa071fda98ecc) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/corelib/ipc/doc/images')
0 files changed, 0 insertions, 0 deletions