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

Segfault when (thread) CounterStats is called with empty vector #67

Closed
ahueck opened this issue Apr 8, 2021 · 0 comments
Closed

Segfault when (thread) CounterStats is called with empty vector #67

ahueck opened this issue Apr 8, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ahueck
Copy link
Contributor

ahueck commented Apr 8, 2021

The segfault happens, if the Runtime is instantiated (and then discarded) by calling only the API that does not mutate the AccessCounter during execution, e.g.,

int main(int argc, char** argv) {
  const void* ret_check=NULL;
  const void* addr = 1;
  typeart_get_return_address(addr, &ret_check);
  return 0;
}

Defect

CounterStats::create -> vals is empty, the following code causes the segfault:

    Counter min  = *std::min_element(vals.begin(), vals.end());
    Counter max  = *std::max_element(vals.begin(), vals.end());
@ahueck ahueck added the bug Something isn't working label Apr 8, 2021
@ahueck ahueck self-assigned this Apr 8, 2021
ahueck added a commit that referenced this issue Apr 8, 2021
@ahueck ahueck mentioned this issue Apr 14, 2021
@ahueck ahueck mentioned this issue May 5, 2021
ahueck added a commit that referenced this issue May 5, 2021
openmp support, see #10 
- Passes: Handle OpenMP codegen in LLVM IR
- Runtime: (optional) thread-safety
- Add extended testing/CI
- Test thread-safety (with sanitizers)
- Various bug fixes/improvements: #67, #65, #63, #60, #58
@ahueck ahueck mentioned this issue Jun 18, 2021
@ahueck ahueck closed this as completed Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant