Skip to content

TSC crashes on <30 line project #17036

Closed
@bcherny

Description

@bcherny

Repro case: https://github.com/bcherny/tsoption/blob/7ae2d5d/index.ts (tree)

Repro steps:

  1. Git pull tsoption@7ae2d5d
  2. Run npm install
  3. Run ./node_modules/.bin/tsc

Node version: 6.9.5
TypeScript version: 2.4.1

Error output:

$ ./node_modules/.bin/tsc

<--- Last few GCs --->

   31467 ms: Mark-sweep 1339.6 (1437.6) -> 1339.6 (1437.6) MB, 1460.1 / 0.0 ms [allocation failure] [GC in old space requested].
   32931 ms: Mark-sweep 1339.6 (1437.6) -> 1339.6 (1437.6) MB, 1463.8 / 0.0 ms [allocation failure] [GC in old space requested].
   34405 ms: Mark-sweep 1339.6 (1437.6) -> 1340.7 (1421.6) MB, 1473.7 / 0.0 ms [last resort gc].
   35885 ms: Mark-sweep 1340.7 (1421.6) -> 1341.8 (1421.6) MB, 1480.1 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

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

Security context: 0x11cf6b9cfb51 <JS Object>
    1: getReturnTypeOfSignature [/Users/bcherny/Sites/tsoption/node_modules/typescript/lib/tsc.js:~27029] [pc=0x11e2ac7e930b] (this=0x11cf6b9e6f19 <JS Global Object>,signature=0x35a7fc95c541 <a Signature with map 0x210c46c5c571>)
    2: getReturnTypeOfSignature [/Users/bcherny/Sites/tsoption/node_modules/typescript/lib/tsc.js:~27029] [pc=0x11e2ac7e84ad] (this=0x11cf6b9e6f19 <JS Global Object>,s...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/bcherny/.nvm/versions/node/v6.9.5/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/bcherny/.nvm/versions/node/v6.9.5/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/bcherny/.nvm/versions/node/v6.9.5/bin/node]
 4: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/Users/bcherny/.nvm/versions/node/v6.9.5/bin/node]
 5: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/bcherny/.nvm/versions/node/v6.9.5/bin/node]
 6: 0x11e2ac2079a7
Abort trap: 6

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions