I recently ran into this assert in the AOT compiler:
- Assertion at /Users/runner/work/1/s/src/mono/mono/metadata/marshal-ilgen.c:6204, condition `sig->param_count == invoke_sig->param_count + 1' not met
  
  
    
        
          |  | g_assert (sig->param_count == invoke_sig->param_count + 1); | 
    
   
 
This was due to a bug in my code, but it took me quite a while to figure out where the problem was, because the assert doesn't give any information as to where in the invalid assembly I should even start looking.
In other words: the bug is that this assert should show information about the type/method in question that causes the problem, which would make it much easier to figure out where the problem is.