Skip to content

Cabal-syntax lexer: out-of-bound array access with the JS backend #8892

Closed

Description

@hsyl20

Describe the bug
Due to a bug in Alex, Cabal-syntax's lexer performs an out-of-bound array access. For GHC's native backends it's just a data corruption but for the JS backend it leads to a runtime JS exception (out-of-bound array access).

To Reproduce
Build and run some setup program with the JS backend. E.g. test ImpSafeOnly in GHC's testsuite

Expected behavior
Don't crash.

System information

  • GHC's JS backend in HEAD

Additional context

  • We could fix by manually patching Lexer.hs
  • Or wait for a new release of Alex (>= 3.2.7.2) and use it to regenerate Lexer.hs

Activity

  1. added 4 commits that reference this issue on Apr 4, 2023
    9d9007c
    ccb6405
    779f6dc
    b5717e6
  2. added a commit that references this issue on Apr 14, 2023
    8a34cb2
  3. added a commit that references this issue on Apr 26, 2023
    ca7a8e2
  4. added 3 commits that reference this issue on Apr 26, 2023
    3af1731
    022f4a7
    4bfd6a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions