cmcfarlen opened a new pull request, #13993: URL: https://github.com/apache/trafficserver/pull/13993
`RemapPluginInfo::setPluginContext()` saved the caller's thread-local `pluginThreadContext` in `_tempContext`, a member of the plugin object that every thread remapping through that plugin shares. When two threads overlap in `doRemap()` (or any other callback wrapped this way), the second overwrites the first's saved value, and the first thread restores the wrong plugin context on return. The saved context now stays on the caller's stack. This also fixes the `setPluginContext` debug line, which printed the old and new contexts in reverse order. Testing: a new `test_RemapPluginInfo` scenario forces the overlap with two threads. It fails on master (`0x2000 == 0x1000`) and passes with this change. The test is Linux-only, like the rest of `test_RemapPluginInfo`. The bug exists on 10.2.x too (it predates the 10.0 source move), hence the Backport label. -- 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]
