Thread overview
[Issue 21918] segfault in getParameterStorageClasses on auto function with error
May 13, 2021
Dlang Bot
May 14, 2021
Dlang Bot
May 30, 2021
Dlang Bot
May 13, 2021
https://issues.dlang.org/show_bug.cgi?id=21918

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> ---
@MoonlightSentinel created dlang/dmd pull request #12517 "Fix 21918 - Segfault for getParameterStorageClasses for invalid funct…" fixing this issue:

- Fix 21918 - Segfault for getParameterStorageClasses for invalid functions

  The type of a `FuncDeclaration` is set to `TypeError` if the `auto`
  inference fails. So `getParameters` has to check that the type is
  actually a `TypeFunction`.

  The additional check in `traits.d` prevents the invalid error message:
  ```
  Error: parameter index must be in range 0..0 not 0
  ```

https://github.com/dlang/dmd/pull/12517

--
May 14, 2021
https://issues.dlang.org/show_bug.cgi?id=21918

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12517 "Fix 21918 - Segfault for getParameterStorageClasses for invalid funct…" was merged into stable:

- 261f701c0c4dd3ba1f208b026c875adb8ef2581c by MoonlightSentinel:
  Fix 21918 - Segfault for getParameterStorageClasses for invalid functions

  The type of a `FuncDeclaration` is set to `TypeError` if the `auto`
  inference fails. So `getParameters` has to check that the type is
  actually a `TypeFunction`.

  The additional check in `traits.d` prevents the invalid error message:
  ```
  Error: parameter index must be in range 0..0 not 0
  ```

https://github.com/dlang/dmd/pull/12517

--
May 30, 2021
https://issues.dlang.org/show_bug.cgi?id=21918

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12600 "merge stable" was merged into master:

- 3b02dc18411a49bd5e9ec43892bec61d4ec0a51c by MoonlightSentinel:
  Fix 21918 - Segfault for getParameterStorageClasses for invalid functions

  The type of a `FuncDeclaration` is set to `TypeError` if the `auto`
  inference fails. So `getParameters` has to check that the type is
  actually a `TypeFunction`.

  The additional check in `traits.d` prevents the invalid error message:
  ```
  Error: parameter index must be in range 0..0 not 0
  ```

https://github.com/dlang/dmd/pull/12600

--