Skip to content

Commit 7745de7

Browse files
Fix UBSan float-cast-overflow in BridgingTest.numberTest (#56693)
Summary: Changelog: [Internal] - Remove UB-relying assertion from BridgingTest.numberTest UndefinedBehaviorSanitizer: float-cast-overflow xplat/js/react-native-github/packages/react-native/ReactCommon/react/bridging/tests/BridgingTest.cpp:73:3 Test was never completed. The test process might have crashed. Buck UI: https://www.internalfb.com/buck2/0e81623b-a566-4181-a630-633a9b0144f5 Test UI: https://www.internalfb.com/intern/testinfra/testrun/22236523178966589 Network: Up: 18KiB Down: 19KiB (reSessionID-47fd7d68-411c-4457-bd30-9da43be7bd6e) Loading targets. Remaining 0/71 1705 dirs read, 2636 targets declared Analyzing targets. Remaining 0/699 23626 actions, 35339 artifacts declared Executing actions. Remaining 0/4161 37:55.2s exec time total Command: test. Finished 1 local, 1256 cache (99% hit) 37:49.9s exec time cached (99%) Time elapsed: 8.6s Buck UI: https://www.internalfb.com/buck2/0e81623b-a566-4181-a630-633a9b0144f5 Tests finished: Pass 23. Fail 1. Timeout 0. Fatal 0. Skip 0. Omit 0. Infra Failure 0. Build failure 0 1 TESTS FAILED ✗ fbsource//xplat/js/react-native-github/packages/react-native/ReactCommon/react/bridging:tests - BridgingTest.numberTest Run $ fdb buck test <args> to debug fbsource//xplat/js/react-native-github/packages/react-native/ReactCommon/react/bridging:tests - BridgingTest.numberTest ^^^ just prefix your previous command! ($ fdb !!) Learn more at https://fburl.com/fdb Use Devmate to fix your errors. Just click the following link: fb-vscode://nuclide.code-compose/devmate/fixtests?run_id=22236523178966589&expiry=2026-05-05T23%3A25%3A46Z&viewer=635101758&signature=43cbc805019cc8a73bade59398f40cf642acd0f57d8fb3377839888ccf52d5d85d5c63d9d0c39ea9956d9aefc641fda19c87c6cdba6136b5a3dd5a67c42cdb92dc4721930a [chpurrer@166047.od /data/sandcastle/boxes/fbsource (b6d9fba9d4)]$ ``` Reviewed By: shwanton Differential Revision: D103954447
1 parent 7ae9b66 commit 7745de7

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

packages/react-native/ReactCommon/react/bridging/tests/BridgingTest.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ TEST_F(BridgingTest, numberTest) {
6969
-42,
7070
static_cast<uint32_t>(
7171
bridging::toJs(rt, static_cast<uint32_t>(-42)).asNumber()));
72-
73-
EXPECT_FALSE(
74-
-42 ==
75-
static_cast<int32_t>(
76-
bridging::toJs(rt, static_cast<uint32_t>(-42)).asNumber()));
7772
}
7873

7974
TEST_F(BridgingTest, stringTest) {

0 commit comments

Comments
 (0)