Created
October 19, 2018 23:53
-
-
Save agentzh/03d6f9e9137ed269cbab46d18aacd0b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 78c9a67ec4e487058c215136594d4bbfe6185ca0 | |
Author: Yichun Zhang (agentzh) <yichun@openresty.com> | |
Date: Wed Oct 3 20:20:26 2018 -0700 | |
bugfix: a NULL deferef crash might happen in const_folder::visit_binary_expression() due to the fact that e->tok might be NULL. | |
It is still not clear why e->tok would end of being NULL in the first | |
place. Need investigations by tracing the full stap AST with stap (or | |
gdb). The core dump can be easily reproduced by running the pyftrace | |
ylang tool with 'stap -vvv' (and also without this patch). | |
This patch is just a quick workaround for now. | |
diff --git a/elaborate.cxx b/elaborate.cxx | |
index 882d1f967..89dad2a7c 100644 | |
--- a/elaborate.cxx | |
+++ b/elaborate.cxx | |
@@ -4618,7 +4618,7 @@ const_folder::visit_binary_expression (binary_expression* e) | |
(right->value <= 0 && (e->op == ">>" || e->op == "<<"))))) | |
{ | |
if (session.verbose>2) | |
- clog << _("Collapsing constant-identity binary operator ") << *e->tok << endl; | |
+ clog << _("Collapsing constant-identity binary operator ") << e->op << endl; | |
relaxed_p = false; | |
// we'll pass on type=pe_long inference to the expression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment