Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/12252

Change subject: systemc: Make the report handler handle null messages.
......................................................................

systemc: Make the report handler handle null messages.

It was checking the first character of the message for a null byte, but
not whether the message string pointer itself was null.

Change-Id: Iddef1e22c35b55c8c898670576ab416dd1023d7c
---
M src/systemc/utils/sc_report_handler.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/systemc/utils/sc_report_handler.cc b/src/systemc/utils/sc_report_handler.cc
index 6b25934..e08ad66 100644
--- a/src/systemc/utils/sc_report_handler.cc
+++ b/src/systemc/utils/sc_report_handler.cc
@@ -413,7 +413,7 @@
     str << report.get_msg_type();

     const char *msg = report.get_msg();
-    if (msg[0])
+    if (msg && msg[0])
         str << ": " << msg;

     if (report.get_severity() > SC_INFO) {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12252
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iddef1e22c35b55c8c898670576ab416dd1023d7c
Gerrit-Change-Number: 12252
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to