-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Milestone
Description
TypeScript Version: [email protected]
, [email protected]
Search Terms:
- Heap overflow
Code
type Foo<T> = Extract<{[i in keyof T]: Foo<T[i]>; }[0], 0>;
Expected behavior:
Should print an error for indexing object literal with 0
or using circular references.
Or at least the same behavior as in v3.3.4000
:
Output when compiled with `[email protected]`
Actual behavior:
NodeJS standard heap crash report: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Playground from typescriptlang.com
produces in-browser heap memory allocation failure:
Playground Link:
Klick me if you are not afraid of crashing your browser's heap
Related Issues:
typesafe-joi
heap overflow JavaScript heap out of memory when compiling typesafe-joi on v3.4.x #30794- extremely slow compilation Extremely slow compilation; resolving generics? #30781
- performance degradation since
[email protected]
3.4.1 tsc works 20! times slower than 3.3.4 #30663 - weird stack overflow issue Weird stack overflow when compiling 4-line code with function, untyped variable, operator and spread operator within cycle #30804
- stackoverflow question about heap overflow
hjkcai and teves-castroRyanCavanaugh
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output