facebook / facebook/hermes

[Juno] assertion failure on empty input

Open
#631 0 comments 0 reactions 1 assignee Claimed by @tmikov View on GitHub
bug juno
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

A ProgramNode is created where the SourceRange is [buffer.end(), buffer.end()). When buffer.end() is passed to Hermes findBufferAndLine(), it works by returning an 0-length DataRef [end(), 0) as a line. Juno can't deal with this because it expects the location to be *inside* the line, so it crashes.

Also reported externally in https://github.com/facebook/hermes/pull/595#issuecomment-961859809 .

Opening this issue for public tracking of the bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.