[
https://issues.apache.org/jira/browse/GEODE-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941081#comment-15941081
]
ASF GitHub Bot commented on GEODE-2713:
---------------------------------------
Github user PivotalSarge commented on a diff in the pull request:
https://github.com/apache/geode-native/pull/74#discussion_r107993045
--- Diff: src/cppcache/src/ThinClientRegion.hpp ---
@@ -416,14 +416,21 @@ class ChunkedFunctionExecutionResponse : public
TcrChunkedResult {
public:
inline ChunkedFunctionExecutionResponse(
- TcrMessage& msg, bool getResult, ResultCollectorPtr rc,
- ACE_Recursive_Thread_Mutex* resultCollectorLock = NULL)
+ TcrMessage& msg, bool getResult, ResultCollectorPtr rc)
: TcrChunkedResult(),
m_msg(msg),
m_getResult(getResult),
- m_rc(rc),
- m_resultCollectorLock(resultCollectorLock) {}
-
+ m_rc(rc) {}
+
+ inline ChunkedFunctionExecutionResponse(
--- End diff --
This code is exercised during function execution (ExecutionImpl.cpp and
ThinClientPoolDM.hpp) and thus is covered by the function execution tests.
> Function execution can lead to passing the address of a stack variable
> ----------------------------------------------------------------------
>
> Key: GEODE-2713
> URL: https://issues.apache.org/jira/browse/GEODE-2713
> Project: Geode
> Issue Type: Bug
> Components: native client
> Reporter: Michael Dodge
>
> In ThinClientRegion::executeFunctionSH(), the address of a stack variable
> (the result collector lock) is passed to the workers. If an exception occurs
> with any of the workers, the function will return, causing the stack variable
> to be destructed. Since the workers have the raw address, it is now a
> dangling pointer situation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)