denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.03k stars 5.23k forks source link

Temporal toLocaleString() causes V8 crash #22584

Open vicary opened 6 months ago

vicary commented 6 months ago

Version: Deno 1.41.0

Running the following line in some machines

Temporal.PlainDate.from("2024-02-25").toLocaleString();

V8 would crash with an error start with the following lines, download complete stack trace.

#
# Fatal error in , line 0
# Check failed: IsString(*time_zone_obj).
#
bartlomieju commented 6 months ago

What is your OS locale set to?

vicary commented 6 months ago
  1. .toLocaleString("en-US"); and .toLocaleString("zh-TW"); fails in the same way.
  2. Temporal.Now.plainDateTimeISO() also fails in the same way.
  3. ✅ Using another Apple M1 Macbook Air which is exactly the same hardware config yesterday, all of the above runs normally without issues. But defaults read -g AppleLocale also gives me en_GB there.
Crashing Macbook Good Macbook
OS Version 14.2.1 (23C71) 14.2.1 (23C71)
defaults read -g AppleLocale en_GB en_GB
echo $LANG en_US.UTF-8 en_US.UTF-8
deno -V deno 1.41.0 deno 1.40.5
vicary commented 6 months ago

It feels like a bug introduced between 1.40.5 and 1.41.0, edited the info into the comment above to avoid cluttering.

Side note: brew install deno@1.40.5 fails to run because deno does not provide any versions except the current HEAD (1.41.0).