diff --git a/packages/react-native/Libraries/AddressSanitizerCrash/AddressSanitizerCrash.js b/packages/react-native/Libraries/AddressSanitizerCrash/AddressSanitizerCrash.js deleted file mode 100644 index 06790e7bc25a..000000000000 --- a/packages/react-native/Libraries/AddressSanitizerCrash/AddressSanitizerCrash.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -import NativeAddressSanitizerCrash from './NativeAddressSanitizerCrash'; - -module.exports = NativeAddressSanitizerCrash; diff --git a/packages/react-native/Libraries/AddressSanitizerCrash/NativeAddressSanitizerCrash.js b/packages/react-native/Libraries/AddressSanitizerCrash/NativeAddressSanitizerCrash.js deleted file mode 100644 index e8e54586ad6e..000000000000 --- a/packages/react-native/Libraries/AddressSanitizerCrash/NativeAddressSanitizerCrash.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -import type {TurboModule} from '../TurboModule/RCTExport'; - -import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule {} - -export default (TurboModuleRegistry.get( - 'RCTAddressSanitizerCrash', -): ?Spec); diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index acec0c5a482e..466a9b604a44 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -35,17 +35,6 @@ declare export default typeof NativeActionSheetManager; " `; -exports[`public API should not change unintentionally Libraries/AddressSanitizerCrash/AddressSanitizerCrash.js 1`] = ` -"declare module.exports: NativeAddressSanitizerCrash; -" -`; - -exports[`public API should not change unintentionally Libraries/AddressSanitizerCrash/NativeAddressSanitizerCrash.js 1`] = ` -"export interface Spec extends TurboModule {} -declare export default ?Spec; -" -`; - exports[`public API should not change unintentionally Libraries/Alert/Alert.js 1`] = ` "export type AlertType = | \\"default\\" diff --git a/packages/react-native/React/CoreModules/RCTAddressSanitizerCrashManager.h b/packages/react-native/React/CoreModules/RCTAddressSanitizerCrashManager.h deleted file mode 100644 index 78209940638d..000000000000 --- a/packages/react-native/React/CoreModules/RCTAddressSanitizerCrashManager.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import - -@interface RCTAddressSanitizerCrashManager : NSObject - -@end diff --git a/packages/react-native/React/CoreModules/RCTAddressSanitizerCrashManager.mm b/packages/react-native/React/CoreModules/RCTAddressSanitizerCrashManager.mm deleted file mode 100644 index d4adaa414f2f..000000000000 --- a/packages/react-native/React/CoreModules/RCTAddressSanitizerCrashManager.mm +++ /dev/null @@ -1,18 +0,0 @@ -// -// RCTAddressSanitizerCrashManager.mm -// Pods -// - -#import "RCTAddressSanitizerCrashManager.h" - -@implementation RCTAddressSanitizerCrashManager - -RCT_EXPORT_MODULE(ASANCrash) - -RCT_EXPORT_METHOD(invokeMemoryCrash) { - char *s = (char*)malloc(100); - free(s); - strcpy(s, "Hello world!"); // AddressSanitizer: heap-use-after-free -} - -@end diff --git a/packages/rn-tester/js/examples/ASAN/ASANCrashExample.js b/packages/rn-tester/js/examples/ASAN/ASANCrashExample.js deleted file mode 100644 index 0dcd696a7891..000000000000 --- a/packages/rn-tester/js/examples/ASAN/ASANCrashExample.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -import type {Node} from 'react'; - -import React from 'react'; -import {Button, NativeModules} from 'react-native'; - -const {ASANCrash} = NativeModules; - -exports.displayName = (undefined: ?string); -exports.framework = 'React'; -exports.title = 'ASAN Crash'; -exports.category = 'Basic'; -exports.description = 'ASAN Crash examples.'; - -exports.examples = [ - { - title: 'Native Address Sanitizer crash', - render(): Node { - return ( -