facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.41k stars 24.25k forks source link

Why do libreact_debug.so and libreact_render_debug.so contain debug? What are their functions? Can they be used for debugging or have backdoors? #46641

Closed yc139464127 closed 1 hour ago

yc139464127 commented 2 hours ago

Description

Why do libreact_debug.so and libreact_render_debug.so contain debug? What are their functions? Can they be used for debugging or have backdoors? Can someone help explain image

Steps to reproduce

1

React Native Version

0.72.29

Affected Platforms

Runtime - Android

Output of npx react-native info

1

Stacktrace or Logs

1

Reproducer

1

Screenshots and Videos

No response

react-native-bot commented 2 hours ago
:warning: Unsupported Version of React Native
:information_source: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
react-native-bot commented 2 hours ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 2 hours ago
:warning: Unsupported Version of React Native
:information_source: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
react-native-bot commented 2 hours ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
yc139464127 commented 2 hours ago

I just want someone to explain this for me.

cortinico commented 1 hour ago

Source code of libreact_debug.so is here: https://github.com/facebook/react-native/tree/65575e8399a08841a0ccbc5b28cafeee6d41714c/packages/react-native/ReactCommon/react/debug

Source code of libreact_renderer_debug.so is here: https://github.com/facebook/react-native/tree/65575e8399a08841a0ccbc5b28cafeee6d41714c/packages/react-native/ReactCommon/react/renderer/debug

They contain debug utilities such as assertions and similar used to support debugging.

Also in 0.76 they're going away as they'll be merged inside libreactnative.so:

yc139464127 commented 17 minutes ago

They contain debug utilities such as assertions and similar used to support debugging.

Why do the two .so files exist in the release version and are named with debug?