This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 --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 ());
 }
 
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]