You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…rrorDataDecoderException.
Motivation:
Currently when HttpPostStandardRequestDecoder throws a ErrorDataDecoderException during construction we leak memory. We need to ensure all is released correctly.
Modifications:
- Call destroy() if parseBody() throws and rethrow the ErrorDataDecoderException
- Add unit test
Result:
Fixes#9513.
…rrorDataDecoderException. (#9517)
Motivation:
Currently when HttpPostStandardRequestDecoder throws a ErrorDataDecoderException during construction we leak memory. We need to ensure all is released correctly.
Modifications:
- Call destroy() if parseBody() throws and rethrow the ErrorDataDecoderException
- Add unit test
Result:
Fixes#9513.
…rrorDataDecoderException. (#9517)
Motivation:
Currently when HttpPostStandardRequestDecoder throws a ErrorDataDecoderException during construction we leak memory. We need to ensure all is released correctly.
Modifications:
- Call destroy() if parseBody() throws and rethrow the ErrorDataDecoderException
- Add unit test
Result:
Fixes#9513.
Expected behavior
throw ErrorDataDecoderException and free direct memory allocated in constructor
Created at:
io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331)
io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185)
io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176)
io.netty.buffer.CompositeByteBuf.allocBuffer(CompositeByteBuf.java:1661)
io.netty.buffer.CompositeByteBuf.copy(CompositeByteBuf.java:1340)
io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1190)
io.netty.buffer.WrappedCompositeByteBuf.copy(WrappedCompositeByteBuf.java:488)
io.netty.buffer.AdvancedLeakAwareCompositeByteBuf.copy(AdvancedLeakAwareCompositeByteBuf.java:681)
io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.offer(HttpPostStandardRequestDecoder.java:282)
io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.(HttpPostStandardRequestDecoder.java:154)
io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.(HttpPostRequestDecoder.java:99)
io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.(HttpPostRequestDecoder.java:52)
Actual behavior
thow Exception , but direct memory is not freed.
Steps to reproduce
allocate direct memory in constructor , when exception appear , memory is not freed
Minimal yet complete reproducer code (or URL to code)
Netty version
Netty version: 4.1.30.Final
JVM version (e.g.
java -version
)jdk8
OS version (e.g.
uname -a
)win10 and Linux 4.9.0-39-custom #12 SMP Sat Jul 22 13:14:22 CST 2017 x86_64 x86_64 x86_64 GNU/Linux``
The text was updated successfully, but these errors were encountered: