================
@@ -0,0 +1,22 @@
+// FIXME: Currently, a nullptr check is in place before emitting a UBSan trap 
reason inside 
+// CodeGenFunction::EmitTrapCheck. This is disadvantageous because we may not 
emit a trap 
+// message in all cases where a trap message should be emitted. The check was 
added to prevent
+// a crash caused by a call to EmitTypeCheck in 
CodeGenFunction::StartFunction. The TypeMismatch 
+// handler is triggered and tries to attach itself to the debug-info location, 
but StartFunction 
+// only sets the debug-info location after the prologue code-gen is done 
resulting in a crash.
----------------
Michael137 wrote:

Don't think we need to include all these details. Lets rephrase it to:
```suggestion**
// FIXME: We should emit a trap message for this case too. But sometimes Clang 
will emit a ubsan trap into the prologue of a function, at which point the 
debug-info locations haven't been set up yet and can't hook up our artificial 
inline frame.
```

https://github.com/llvm/llvm-project/pull/145967
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to