Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Bad handling of .toString() on large numbers breaks uglify. #390

Closed

Description

@creationix
  • Version: v8.4.0
// node -pe 'process.versions'
{ http_parser: '2.7.0',
  node: '8.4.0',
  chakracore: '1.7.1.0',
  uv: '1.13.1',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  modules: '57',
  nghttp2: '1.22.0',
  openssl: '1.0.2l',
  icu: '59.1',
  unicode: '9.0',
  cldr: '31.0.1',
  tz: '2017b' }
  • Platform: Darwin macbook-pro.lan 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

  • Subsystem: chakracore

When I try to use uglify on a file that contains large number literals, the JS engine in chakracore emits syntax errors.

# When using chakrecore
$ node -pe '(0x10000000000000000).toString(8)'
2(e+21)
# When using v8
$ node -pe '(0x10000000000000000).toString(8)'
2000000000000000000000

See also: mishoo/UglifyJS#2304

Activity

  1. MSLaguana commented on Sep 11, 2017

    @MSLaguana
    Contributor

    Thanks for the report, I believe that there is a PR that will fix this issue currently under review at chakra-core/ChakraCore#3635

  2. creationix commented on Sep 11, 2017

    @creationix
    ContributorAuthor

    Awesome, best of luck merging it!

  3. xiaoyinl commented on Oct 21, 2017

    @xiaoyinl

    It's fixed in the chakracore upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions