Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8257604: JNI_ArgumentPusherVaArg leaks valist
Reviewed-by: dcubed, coleenp
  • Loading branch information
tstuefe committed Dec 3, 2020
1 parent 4169d96 commit ae1eb28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hotspot/share/prims/jni.cpp
Expand Up @@ -870,7 +870,6 @@ class JNI_ArgumentPusher : public SignatureIterator {


class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher {
protected:
va_list _ap;

void set_ap(va_list rap) {
Expand Down Expand Up @@ -906,6 +905,10 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher {
set_ap(rap);
}

~JNI_ArgumentPusherVaArg() {
va_end(_ap);
}

virtual void push_arguments_on(JavaCallArguments* arguments) {
_arguments = arguments;
do_parameters_on(this);
Expand Down

1 comment on commit ae1eb28

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.