Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62175

Regexp.lastIndex sometimes leak between separate instances

XMLWordPrintable

      In the work to port kate to QmlScript I encountered another RegExp bug in QML. I unfortunately haven't been able to write a reduced test-case yet, but what happened was that lastIndex on a global RegExp started not null, if the same RegExp literal had been matched before, even though the new match was started from a new literal.

      I am assuming there is a cache of compiled RegExps somewhere, and we probably are lacking a reset of lastIndex when a new RegExp gets a cached value instead of a new C++ object.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            allan.jensen Allan Sandfeld Jensen
            allan.jensen Allan Sandfeld Jensen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes