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

fix(bug): resolve static initialization order problem of s_storage_rpc_req_codes #340

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

levy5307
Copy link
Contributor

In function test of pegasus, insert into s_storage_rpc_req_codes will cause coredump, which was call by macro DEFINE_STORAGE_WRITE_RPC_CODE. But it`s normal when I runs onebox on local environment. It is caused by static initialization order probleom. Because DEFINE_STORAGE_WRITE_RPC_CODE was called first, but s_storage_rpc_req_codes was not initlized, so it produces coredump. As description, we have a 50%-50% chance of corrupting the program.

@neverchanje neverchanje changed the title bugfix: resolve static initialization order problem of s_storage_rpc_req_codes fix(bug): resolve static initialization order problem of s_storage_rpc_req_codes Nov 19, 2019
@neverchanje neverchanje merged commit a15faf6 into XiaoMi:master Nov 19, 2019
@neverchanje neverchanje added the type/bug-fix This PR fixes a bug. label Nov 19, 2019
neverchanje pushed a commit that referenced this pull request Nov 19, 2019
@levy5307 levy5307 deleted the static_init_problem branch May 26, 2020 06:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug-fix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants