Issue 1:
Hello!

Today I've returned to my computer (aarch64 macOS 13.1) and now if I run deno in the terminal it hangs for about 40 seconds before the shell starts. Once the shell it present it works and feels normal, but then the program entirely crashes with an OOM error 5 to 10 seconds later.

Deno 1.32.2
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> 1
1
> 2
2
<--- Last few GCs --->

[626:0x110040000] 57466 ms: Scavenge 1373.0 (1423.1) -> 1372.2 (1433.1) MB, 3.12 / 0.00 ms (average mu = 0.831, current mu = 0.711) allocation failure;
[626:0x110040000] 57487 ms: Scavenge 1378.1 (1433.1) -> 1376.2 (1434.4) MB, 4.08 / 0.00 ms (average mu = 0.831, current mu = 0.711) allocation failure;
[626:0x110040000] 57622 ms: Scavenge 1379.7 (1434.4) -> 1378.2 (1453.4) MB, 123.38 / 0.00 ms (average mu = 0.831, current mu = 0.711) allocation failure;

<--- JS stacktrace --->

#
# Fatal javascript OOM in Reached heap limit
#

fish: Job 1, 'deno' terminated by signal SIGTRAP (Trace or breakpoint trap)

I have not knowningly changed my computer at all since when I last used Deno on this machine a few days ago.

If I run deno --log-level=debug it prints many many lines like this before it crashes:

DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:///Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1/es6/Pointed.d.ts to /Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1
DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:///Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1/es6/Predicate.d.ts to /Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1
DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:///Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1/es6/Refinement.d.ts to /Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1

Here is the full log: deno-log.txt

If I move ~/Library/Caches/deno/npm to a new location it no longer crashes, but it still takes 6 seconds to start the shell.

Here is the logs for when that happens:

$ time deno --log-level=debug
DEBUG RS - deno::args::package_json:147 - No package.json file found
DEBUG RS - deno::cache::cache_db:129 - Opening cache /Users/louis/Library/Caches/deno/dep_analysis_cache_v1...
DEBUG RS - deno::cache::cache_db:129 - Opening cache /Users/louis/Library/Caches/deno/node_analysis_cache_v1...
DEBUG RS - deno::js:10 - Deno isolate init with snapshots.
DEBUG JS - args []
DEBUG RS - deno::args::package_json:147 - No package.json file found
DEBUG RS - deno_runtime::permissions:58 - ⚠️️ Granted net access to "deno.land"
DEBUG RS - deno::file_fetcher:342 - FileFetcher::fetch_remote() - specifier: https://deno.land/.well-known/deno-import-intellisense.json
DEBUG RS - deno_runtime::permissions:58 - ⚠️️ Granted net access to "deno.land"
DEBUG RS - deno::file_fetcher:245 - FileFetcher::fetch_cached - specifier: https://deno.land/.well-known/deno-import-intellisense.json
Deno 1.32.2
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
>

________________________________________________________
Executed in 6.07 secs fish external
usr time 6.66 secs 0.08 millis 6.66 secs
sys time 0.29 secs 1.72 millis 0.29 secs

Do let me know what else I can do to help debug!

Thanks,

Louis

edit: I mistaken when I said removing the npm cache directory fixed it, it seems to instead be based upon what my working directory is. If I'm in my home directory it crashes, but if I'm in the ~/Library/Caches/deno it starts the shell in 6 seconds and uses 2.52GB of memory at start. If I run it in a new directory it starts near instantly and uses 54MB.

edit 2: 1.32.3 does not have this problem, but I had to manually upgrade. brew doesn't have this for some reason.

Issue 2:
OS: Windows 10 Version 10.0.19045.2728

From deno 1.32.1+7722014 and up, running deno repl or just deno from certain directories causes the deno process to hang with no repl prompt and with excessive memory usage.

The bug is reproducible if running deno from C:\, C:\Windows, C:\Users, C:\Users\<current_user>, C:\Windows\System32, C:\Windows\SysWow64. At the same time runinng deno repl from C:\Users\<current_user>\Desktop or C:\Windows\System32\wbem proceeds as normal. These are the directories that I've tested which reproduced the bug 100% of the times. Other directories and drives seems unaffected.

The last unaffected canary version with available binaries to download is deno 1.32.1+e888c3f

Edit:

Just checked with the 1.32.2 release. It's still affected.

Edit2:

Checked 1.32.2 Linux under Windows WSL, it hangs when executing with the root dir (/) as the current directory.