Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mono does not suspend on unhandled exception #16588

@messani

Description

@messani

Steps to Reproduce

  1. Code
using System;

namespace Test
{
  class MainClass
  {
    public static void Main(string[] args)
    {
      throw new Exception("blabla");
    }
  }
}
  1. Run:
    MONO_DEBUG=suspend-on-unhandled mono ./Test.exe

Current Behavior

Unhandled Exception:
System.Exception: blabla
at Test.MainClass.Main (System.String[] args) [0x00001] in <36e3bc63485340bfbb0ade4f561e1edc>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: blabla
at Test.MainClass.Main (System.String[] args) [0x00001] in <36e3bc63485340bfbb0ade4f561e1edc>:0

and then mono process ends.

Expected Behavior

mono process should suspend so I can attach to it for example with gdb.

On which platforms did you notice this

[ ] macOS
[*] Linux
[ ] Windows

Version Used:

Mono JIT compiler version 6.0.0.327 (tarball Thu Aug 29 21:19:42 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(600)
Suspend: hybrid
GC: sgen (concurrent by default)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions