Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Thu, Mar 8, 2012 at 11:14 AM, Caolán McNamara <caolanm@redhat.com> wrote:
So, for https://bugs.freedesktop.org/show_bug.cgi?id=46923 under Linux
with debugging stl iterators I can see "use of invalid iterator" stl
errors with miAutoPosColumn which is a plausible reason for the reported
crash.

miAutoPosFormula is used to point into the std::set pFormulaData and
miAutoPosColumn is used to point into the std::set pColumnData

I reckon the safest thing to do is to initialize those to the end of
their respective containers when the containers are initially allocated,
i.e.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3f1614c606629196ca71dc22dab3343b060dced

Your fix looks good.  Thanks for catching it.  It was the result of me
switching from an integer based quasi iterators to the real STL
iterators.

But I did that refactoring for master only.  The 3.5 code has
something completely different (and even less safe); it uses a single
integer member nAutoPos to handle both formula and column positions.

So, I have my doubt that the invalid use of iterator you saw on master
applies to the 3.5 branch.

Kohei

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.