GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Auto-port 5.0: Avoid classloader leak via the shared TransferEncodingNotAllowedException by netty-project-bot · Pull Request #18355 · netty/netty Conversation
Contributor
Auto-port of #18342 to 5.0 Motivation:
Modification:
This adds public API: the two protected constructors above. The alternative was to make Result: The shared The same exception exists in 4.1 and 5.0.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…tion (#18342) Motivation: `HttpObjectDecoder` keeps a static `TransferEncodingNotAllowedException`. `ThrowableUtil.unknownStackTrace(...)` replaces its visible stack trace, but not its native backtrace, which references the classes of every frame on the stack of whatever code triggered the class initialization. When Netty is shared by the web applications of a servlet container, this pins the class loader of the first one that created an HTTP decoder. Same mechanism as #17128. Modification: - Create the shared instance with a writable stack trace disabled, through a package-private factory, as `QpackException.newStatic(...)` does. - To pass that setting on, add a protected constructor `(String, Throwable, boolean enableSuppression, boolean writableStackTrace)` to `CodecException` and `DecoderException`. - Add a regression test. **This adds public API:** the two protected constructors above. The alternative was to make `TransferEncodingNotAllowedException` non-final, so that it could have a stackless subclass like `SpdyProtocolException`'s. Result: The shared `TransferEncodingNotAllowedException` no longer keeps the class loader of its first caller alive. Its stack trace is now empty, instead of naming `HttpObjectDecoder.readHeaders(ByteBuf)`. (cherry picked from commit 742a53e) …lInStackTrace Motivation: EmbeddedChannel.writeInbound(...) and finish() declare 'throws Exception' on 5.0, so the test cherry-picked from 4.1 did not compile. Modification: Add 'throws Exception' to the test method. Result: The test compiles on 5.0.
|
There was an error while loading. Please reload this page.
🚨 All tests passed but jobs failed 🚨Failed Jobs without Test Failures❌ Build PR / linux-x86_64-java25-awslc build 🏷️ Commit: dc1ceb7 Rerun ControlsClick the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.