From df9b9a638bab60dfe28be0ad8606ed20c6c0cfba Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 15 Dec 2015 17:04:00 +0000 Subject: [PATCH] src/method-impl.lisp (compute-method-entry-functions): Fix varargs handling. The `convert-stmts' in `finish-entry' didn't cover the trailing `va_end', with the possible result of a premature return. --- src/method-impl.lisp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/method-impl.lisp b/src/method-impl.lisp index 4c694e1..6f22a14 100644 --- a/src/method-impl.lisp +++ b/src/method-impl.lisp @@ -455,13 +455,15 @@ . raw-entry-args)))) (codegen-push codegen) (ensure-var codegen *sod-ap* (c-type va-list)) - (emit-inst codegen - (make-va-start-inst *sod-ap* - (argument-name parm-n))) (convert-stmts codegen entry-target return-type (lambda (target) - (deliver-expr codegen target call))) - (emit-inst codegen (make-va-end-inst *sod-ap*)) + (emit-inst codegen + (make-va-start-inst + *sod-ap* + (argument-name parm-n))) + (deliver-expr codegen target call) + (emit-inst codegen + (make-va-end-inst *sod-ap*)))) (codegen-pop-function codegen main main-type)))))) ;; Generate the method body. We'll work out what to do with it later. -- 2.11.0