This repository was archived by the owner on Oct 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
src/addins/PerformanceDiagnostics/PerformanceDiagnostics Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 227227 }
228228}
229229
230+ extern " C" void crash_me ()
231+ {
232+ void *p = (void *)0x12345 ;
233+ *(int *)p = 0 ;
234+ }
235+
230236int
231237main (int argc, char **argv)
232238{
Original file line number Diff line number Diff line change @@ -201,5 +201,16 @@ protected override void Run ()
201201 Thread . Sleep ( TimeSpan . FromMinutes ( 2 ) ) ;
202202 }
203203 }
204+
205+ class InduceNativePInvokeCrashHandler : CommandHandler
206+ {
207+ [ DllImport ( "__Internal" ) ]
208+ static extern void crash_me ( ) ;
209+
210+ protected override void Run ( )
211+ {
212+ crash_me ( ) ;
213+ }
214+ }
204215#endif
205216}
Original file line number Diff line number Diff line change 1515 <Command id =" PerformanceDiagnosticsAddIn.InduceHang"
1616 defaultHandler=" PerformanceDiagnosticsAddIn.InduceHangHandler"
1717 _label=" Induce Hang" />
18+ <Command id =" PerformanceDiagnosticsAddIn.InduceNativePInvokeCrash"
19+ defaultHandler=" PerformanceDiagnosticsAddIn.InduceNativePInvokeCrashHandler"
20+ _label=" Induce PInvoke Crash" />
1821
1922 </Extension >
2023 <Extension path =" /MonoDevelop/Ide/MainMenu/Help" >
2427 <CommandItem id =" PerformanceDiagnosticsAddIn.InduceManagedCrash" />
2528 <CommandItem id =" PerformanceDiagnosticsAddIn.InduceNativeCrash" />
2629 <CommandItem id =" PerformanceDiagnosticsAddIn.InduceHang" />
30+ <CommandItem id =" PerformanceDiagnosticsAddIn.InduceNativePInvokeCrash" />
2731
2832 </ItemSet >
2933 </Extension >
You can’t perform that action at this time.
0 commit comments