diff mbox

[committed] jit: fix crash in memento_of_new_string_literal::make_debug_string

Message ID 1421688480-21771-1-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Jan. 19, 2015, 5:28 p.m. UTC
Fix a crash due to missing a format string in a printf-style call,
when printing a string literal that contains formatting characters.

Seen on aarch64, where the patch takes jit.sum to:
        # of expected passes            7514
and no failures.

Committed to trunk as r219851.

gcc/jit/ChangeLog:
	* jit-recording.c
	(gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
	Add missing format string.
---
 gcc/jit/jit-recording.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
index 76eabbd..2900e18 100644
--- a/gcc/jit/jit-recording.c
+++ b/gcc/jit/jit-recording.c
@@ -4012,6 +4012,7 @@  recording::string *
 recording::memento_of_new_string_literal::make_debug_string ()
 {
   return string::from_printf (m_ctxt,
+			      "%s",
 			      m_value->get_debug_string ());
 }