[
https://issues.apache.org/jira/browse/TS-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900742#action_12900742
]
Leif Hedstrom commented on TS-419:
----------------------------------
Here's a slight modification to the patch proposal:
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 6ad6380..f594536 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -393,10 +393,13 @@ void
INKError(const char *fmt, ...)
{
va_list args;
- va_start(args, fmt);
if (is_action_tag_set("deft") || is_action_tag_set("sdk_vbos_errors")) {
+ va_start(args, fmt);
diags->print_va(NULL, DL_Error, NULL, NULL, fmt, args);
+ va_end(args);
}
+
+ va_start(args, fmt);
Log::va_error((char *) fmt, args);
va_end(args);
}
> Segmentation fault in INKError when error output is made both in error log
> and as debug messages
> --------------------------------------------------------------------------------------------------
>
> Key: TS-419
> URL: https://issues.apache.org/jira/browse/TS-419
> Project: Traffic Server
> Issue Type: Bug
> Components: InkAPI
> Affects Versions: 2.1.1, 2.1.0, 2.0.1, 2.0.0
> Reporter: Yakov Markovitch
> Attachments: INKError.patch
>
>
> When TS is configures so that to print INKError messages both to the error
> log and as debug messages (e.g. by starting TS with -B 'deft'), calling
> INKError with variable arguments (like INKError("The answer to the %s is %d",
> "Ultimate Question of Life, the Universe, and Everything", 42)) causes
> segfault.
> The cause of this bug is that INKError uses once initialised va_args pointer
> two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.