Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Feature/try fix top native crash fd problem #2854

Merged

Conversation

Darin726
Copy link
Contributor

  1. 全局的 fd 操作改成局部变量, 每次初始化互不干扰
  2. mmap 返回 9 或 13 再次尝试创建一次 fd.
  3. 创建 fd 的操作放在各自的线程.
  4. 创建 fd 时加上进程号, 各进程采用不同的名字. 做好隔离.

东煜 added 2 commits August 26, 2019 15:57
所有的 fd 操作都控制在局部变量. 去掉所有的静态变量. 防止全局污染
@weex-bot
Copy link

weex-bot commented Aug 28, 2019

Warnings
⚠️ No Changelog changes! - Can you add a Changelog? To do so,append your changes to the changelog.md
⚠️ Current pr not bind the milestone
⚠️ If your PR is about fixing a bug excluding crash the code,you should add the demo link in the PR description. Demo link: http://dotwe.org/vue
Messages
📖 danger test finished.

Generated by 🚫 dangerJS against de592d6


void *WeexConnInfo::mmap_for_ipc() {
pid_t pid = getpid();
std::string clientName(this->is_client ? "WEEX_IPC_CLIENT" : "WEEX_IPC_SERVER");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"clientName" is confusing, Actually it means “client/server” mmap name。

if (this->is_client) {
throw IPCException("failed to create ashmem region: %s", strerror(errno));
} else {
LOGE("failed to create ashmem region: %s", strerror(errno))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add return base

Copy link
Contributor

@lucky-chen lucky-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@lucky-chen lucky-chen merged commit af7c957 into apache:master Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants