<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - crash because of null string on solaris"
href="https://bugs.freedesktop.org/show_bug.cgi?id=55607#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - crash because of null string on solaris"
href="https://bugs.freedesktop.org/show_bug.cgi?id=55607">bug 55607</a>
from <span class="vcard"><a class="email" href="mailto:pierre-bugzilla@ossman.eu" title="Pierre Ossman <pierre-bugzilla@ossman.eu>"> <span class="fn">Pierre Ossman</span></a>
</span></b>
<pre>Threads not created by PulseAudio however can lack a name. In this case the
main thread.
Alternative patch using pa_strnull():
Index: src/pulsecore/log.c
===================================================================
--- src/pulsecore/log.c (revision 27649)
+++ src/pulsecore/log.c (working copy)
@@ -303,9 +303,9 @@
pa_vsnprintf(text, sizeof(text), format, ap);
if ((_flags & PA_LOG_PRINT_META) && file && line > 0 && func)
- pa_snprintf(location, sizeof(location), "[%s][%s:%i %s()] ",
pa_thread_get_name(pa_thread_self()), file, line, func);
+ pa_snprintf(location, sizeof(location), "[%s][%s:%i %s()] ",
pa_strnull(pa_thread_get_name(pa_thread_self())), file, line, func);
else if ((_flags & (PA_LOG_PRINT_META|PA_LOG_PRINT_FILE)) && file)
- pa_snprintf(location, sizeof(location), "[%s] %s: ",
pa_thread_get_name(pa_thread_self()), pa_path_get_filename(file));
+ pa_snprintf(location, sizeof(location), "[%s] %s: ",
pa_strnull(pa_thread_get_name(pa_thread_self())), pa_path_get_filename(file));
else
location[0] = 0;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>