intel / intel/confidential-computing.sgx.sdk

s_enclave_elrange_map destructor is invalid

Open
#109 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

In sdk/simulation/urtssim/enclave_creator_sim.cpp the declared destructor procedure is not guaranteed to run after std::map::~map due to the semantics of static objects. The value type is trivially copyable and destructible, so it doesn't need to be heap-allocated to begin with.

Contributor guide

Open the contributing guide

Research direction

Start in sdk/simulation/urtssim/enclave_creator_sim.cpp and inspect the declaration and cleanup of s_enclave_elrange_map. Confirm how its current allocation interacts with std::map destruction, then make the storage and lifetime match the value type's trivial copy and destruction properties. Verify the simulator still builds and its relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
security
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.