* Fix segfault with dump files
@ 2017-11-08 5:17 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2017-11-08 5:17 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
Some old Solaris libcs don't like being passed a NULL pointer as the string
parameter corresponding to the %s marker of formatting functions.
Fixed thusly, tested on SPARC/Solaris, applied on the mainline as obvious.
2017-11-07 Eric Botcazou <ebotcazou@adacore.com>
* gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
--
Eric Botcazou
[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 420 bytes --]
Index: gimple-pretty-print.c
===================================================================
--- gimple-pretty-print.c (revision 254449)
+++ gimple-pretty-print.c (working copy)
@@ -86,7 +86,7 @@ dump_profile (profile_count &count)
{
char *buf;
if (!count.initialized_p ())
- return NULL;
+ return "";
if (count.ipa_p ())
buf = xasprintf ("[count: %" PRId64 "]",
count.to_gcov_type ());
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-07 23:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 5:17 Fix segfault with dump files Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).