hermes: ''.toLocaleLowerCase() returns garbled string after upgrading to Hermes

2
open
savv
savv
Posted 3 months ago

hermes: ''.toLocaleLowerCase() returns garbled string after upgrading to Hermes #32394

Description

hermes: ''.toLocaleLowerCase() returns garbled string after upgrading to Hermes

React Native version:

System: OS: macOS 11.6 CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @2.40GHz Memory: 26.81 GB / 64.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 14.17.0 - /var/folders/k7/k4qw8lp91c9g98zt320rclvc0000gn/T/yarn--1634135262308-0.5962760227517057/node Yarn: 1.22.10 - /var/folders/k7/k4qw8lp91c9g98zt320rclvc0000gn/T/yarn--1634135262308-0.5962760227517057/yarn npm: 7.19.1 - /usr/local/bin/npm Watchman: 2021.08.23.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2 System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom Android NDK: 19.2.5345600 IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 13.0/13A233 - /usr/bin/xcodebuild Languages: Java: 1.8.0_282 - /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.0 => 0.66.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. enable hermes on Android
  2. run ''.toLocaleLowerCase() (works in dev mode)

Expected Results

I expected an empty string :)

zzorba
zzorba
Created 1 month ago

I've experienced some crashes on Android related to this as well, with an error message of String length exceeds limit.

mohamed2m2018
mohamed2m2018
Created 1 month ago

I experienced this issue on android as well.