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

V4 Crashes when using Reflect.ownKeys(...)

    XMLWordPrintable

Details

    • 8c451bba7 (dev), 39297011b (6.5), e8147ec5b (6.6), f5866fb27 (tqtc/lts-6.2)

    Description

      Just call:
      Reflect.ownKeys(Math)

      That's cheeky but its not the only "special" object.  For example if you are just trying to figure out the "keys" for Math you can just do:
      Object.keys(Math)

      as that returns []
      But the same is true for:
      Object.keys(console)

      []

      But you can use:

      Reflect.ownKeys(console)
      [debug,log,info,...]

      So Reflect "can" work for special objects
      {{}}

       

      But in the case of:
      Reflect.ownKeys(Math)

      Qt will Assert in debug mode and crash will a nullptr dereference otherwise.

      Attachments

        For Gerrit Dashboard: QTBUG-113854
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes