https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118047

--- Comment #10 from Benjamin Miller <MillerBenjaminT at johndeere dot com> ---
In case you're interested, here's the failing part of the Qt sources:
```
std::vector<ExtensionContext> extContexts { { /* 0 - Always available */ } };
```
https://github.com/qt/qtquick3d/blob/6.8.0/src/runtimerender/rendererimpl/qssglayerrenderdata_p.h#L413

In this case, a recently added assertion came in with the compiler and caught
this but I think if I had only updated the compiler this would have resulted in
undefined behavior following this pattern:

std::vector<Something> somethings { { /* 0 - Always available */ } };

// ... later
somethings[0].readOrWrite(); // Undefined behavior


Could this be exploitable?  It seems like it could be if an attacker could
manipulate the memory at the end of the vector but that would depend on the
implementation in libstdc++.

Reply via email to