Skip to content

Infinite loop in HtmlDocument.Parse #1264

@njlr

Description

@njlr

This program will never finish, and takes increasing amounts of memory:

open System
open FSharp.Data

let content =
  """
  Steve Jobs
  steve@apple.com

  Education:
    - Master of Mathematics Honours Computer Science and Combinatorics &
      Optimization. I
      specialized in systems and real-time programming, programming language
      implementation, and mathematical optimization.

  Skills:
    - Proficient in Rust, C++, Scheme, x86(_64) LaTeX,
      (Postgre)SQL, Gurobi, AWS, Google Cloud Platform, .NET (Core), C#,
      Python, low-level profiling and optimization on Linux and Windows.

    - Can do things with Java, Haskell, Clojure,
      Scala, AMPS, redis, OpenGL.

    Instructional support assistant at the School,
    September to January 2010.
      - Started the Java project[3], a custom IDE for students in an
        introductory computer science course.


  """

[<EntryPoint>]
let main argv =
  printfn "%s" "Parsing HTML... "

  let html = HtmlDocument.Parse content

  printfn "%s" "done. "

  0

I would expect it to return an "invalid HTML" error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions