Closed piercefreeman closed 6 months ago
I see now that there are separate flags to link ICU at runtime. For anyone else that stumbles on this crash in the future:
https://github.com/denoland/rusty_v8/pull/603 https://github.com/denoland/deno_core/blob/d8e13061571e587b92487d391861faa40bd84a6f/core/runtime/setup.rs#L21
The fix ends up being pretty simple, you just need to link the common .dat
file with v8::icu::set_common_data_73
. The deno_core_icudata publishes this file to an isolated crate as well.
v8::icu::set_common_data_73(deno_core_icudata::ICU_DATA).unwrap();
Javascript code that attempts to access internal ICU hooks (like Intl.DateTimeFormat) will throw a heap error, even though there is sufficient space left on the heap:
Similar to this upstream Chromium issue, but definitely present in rusty-v8
0.82.0
onward. Seems to be related to compile-time flags and linking. The source issue lies in this DateTimePatternGeneratorCache V8 class where it's failing to allocate.Full rust code to reproduce:
System Config: