Skip to content

Assertion failure: assert next_code_length >= code_length when code_length overflows #440

Description

@arai-a

Steps to reproduce:

  1. run the following Python script and redirect the output to test.js
    for i in range(1, 23):
        for j in range(0, int(1.7**i)):
            print '{};'.format(i)

(the result is 1.1MB of JS file)

  1. encode the JS file generated in step 1 with fbssdc

Actual result:

crash at

assert next_code_length >= code_length, f'{k}, {next_code_length}, {code_length}'

AssertionError: (2097151, 21), 20, 21

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions