Zouxxyy commented on PR #13152: URL: https://github.com/apache/gluten/pull/13152#issuecomment-5856146878
Thanks for the review. Could you point to the exact file/line and the object whose lifetime ends too early? The summary mentions dangling references, but there is no corresponding inline finding. I checked the relevant captures at `9defc5ed3`: - In `workersDetachAfterTheirLastCallback`, the reference capture refers to the vector element. The vector is not resized, and all workers are joined before it is destroyed. This follows the [C++ reference-capture lifetime rules](https://eel.is/c++draft/expr.prim.lambda.capture#13). - The Folly/Bolt cleanup callbacks reference test-local objects that remain alive through `pool.join()`. The Folly cleanup test captures its cached `JNIEnv*` by value. The linked `newThread` finding also appears incorrect: the pinned [Folly v2026.09.07.00 base interface](https://github.com/facebook/folly/blob/v2026.09.07.00/folly/executors/thread_factory/ThreadFactory.h) declares `newThread(Func&&)`, matching this implementation. I agree that the JNI cleanup ordering warrants maintainer review. The patch explicitly limits automatic cleanup to managed workers on Linux/glibc and does not claim ordering guarantees for arbitrary repeatedly re-armed TLS destructors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
