This is the mail archive of the gcc-bugs@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]

[Bug sanitizer/63956] [5 Regression][UBSAN] ICE segfault in cxx_eval_call_expression ../../gcc/cp/constexpr.c


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63956

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Earlier today I tried the following and it seemed to work, but I don't know
constexpr.c, so it may be totally bogus.

--- gcc/cp/constexpr.c
+++ gcc/cp/constexpr.c
@@ -1149,6 +1149,10 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree
t,
   constexpr_call *entry;
   bool depth_ok;

+  if (fun == NULL_TREE
+      && CALL_EXPR_IFN (t) == IFN_UBSAN_NULL)
+    return t;
+
   if (TREE_CODE (fun) != FUNCTION_DECL)
     {
       /* Might be a constexpr function pointer.  */


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