Skip to content

Conversation

@arukuka
Copy link
Member

@arukuka arukuka commented Aug 23, 2022

Summary

Check if pointer is valid on exception handling

Purpose

Contents

Testing Methods Performed

  • patch
    diff --git a/src/ComputationContainer/Job/Jobs/CorrelJob.hpp b/src/ComputationContainer/Job/Jobs/CorrelJob.hpp
    index 574435ad..cc59e147 100644
    --- a/src/ComputationContainer/Job/Jobs/CorrelJob.hpp
    +++ b/src/ComputationContainer/Job/Jobs/CorrelJob.hpp
    @@ -18,6 +18,9 @@ public:
             const std::vector<std::list<int>> &arg
         )
         {
    +        std::vector<int> vec;
    +        std::cerr << vec.at(1) << std::endl;
    +
             std::list<std::vector<Share>> cols;
             int n = table.size();
             int m = table[0].size();
  • result
    computation_container1  | [2022-08-23 10:35:48.671] [info] method id is: 4
    computation_container1  | [2022-08-23 10:35:49.033] [error] unexpected Error
    computation_container1  | 2022-08-23 10:35:49+0000|ERROR|vector::_M_range_check: __n (which is 1) >= this->size() (which is 0)|Job Error
    computation_container1  | 2022-08-23 10:35:49+0000|ERROR|thrown exception has no stack trace information
    

If exception was thrown by standard lib, this pointer is null
Copy link

@mdonaka mdonaka left a comment

Choose a reason for hiding this comment

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

Thanks!

@arukuka arukuka merged commit 39c2b50 into develop Aug 24, 2022
@arukuka arukuka deleted the fix/otsuka/cc_exception_handling branch August 24, 2022 11:46
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.

SIGSEGV occured when exception thrown being outside CC

4 participants