Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Issues
  • #702
Closed
Open
Issue created May 06, 2017 by Administrator@rootContributor

bug: Unicode character causes v8 timeout.

Created by: egriff38

I was trying to create a new operator using the nabla (∇) character, and the compiler timed out:

$ sjs operators.js

<--- Last few GCs --->

[69027:0x102802000]    89813 ms: Mark-sweep 1400.3 (1460.0) -> 1400.3 (1460.0) MB, 745.5 / 0.0 ms  allocation failure GC in old space requested
[69027:0x102802000]    90595 ms: Mark-sweep 1400.3 (1460.0) -> 1400.2 (1430.0) MB, 782.0 / 0.0 ms  last resort gc
[69027:0x102802000]    91459 ms: Mark-sweep 1400.2 (1430.0) -> 1400.2 (1430.0) MB, 864.0 / 0.0 ms  last resort gc


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0xfa41bcc0d39 <JS Object>
    1: readToken [/usr/local/lib/node_modules/@sweet-js/cli/node_modules/sweet-core/dist/reader/token-reader.js:~75] [pc=0xeea59659f36](this=0x24757670b1b1 <a Reader with map 0x258b8f83ad89>,/* anonymous */=0x24757670b149 <a CharStream with map 0x258b8f83ab21>)
    2: arguments adaptor frame: 3->1
    3: readUntil [/usr/local/lib/node_modules/@sweet-js/cli/node_modules/sweet-core/dist/reader/tok...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
 4: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/bin/node]
 5: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
 6: 0xeea593063a7
[1]    69027 abort      sjs operators.js

Here was the code I was trying to use:

operator ∇ left 1 = (left,right) => {
  return #`${right}(${left})`;
}
Assignee
Assign to
Time tracking