Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict more on edges map API #2117

Merged
merged 17 commits into from
Apr 29, 2024
Merged

Restrict more on edges map API #2117

merged 17 commits into from
Apr 29, 2024

Conversation

tokatoka
Copy link
Member

@tokatoka tokatoka commented Apr 26, 2024

Disallow the use of std_edges_map_observer unless it is using sancov backend.

This is because std_edges_map_observer relies on edges_max_num. However edges_max_num() will only set to be the real number of edges in the target only if you are using the sancov backend.

If it is used without this prerequisite, then it is wrong

@tokatoka tokatoka changed the title Delete EDGES_MAP_PTR_NUM edges_max_num Restrict more on edges map API Apr 26, 2024
@tokatoka tokatoka requested a review from rmalmain April 26, 2024 16:23
@@ -692,7 +692,7 @@ where
pub extern "C" fn trace_block_transition_hitcount(_: *const (), id: u64) {
unsafe {
PREV_LOC.with(|prev_loc| {
let x = ((*prev_loc.get() ^ id) as usize) & (EDGES_MAP_PTR_NUM - 1);
Copy link
Member Author

Choose a reason for hiding this comment

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

@rmalmain
can you check these are correct?

@tokatoka tokatoka merged commit 50f14d4 into main Apr 29, 2024
103 checks passed
@tokatoka tokatoka deleted the delete_strange_code branch April 29, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant