Bug 60928 - Mono crashes when debugging dynamically generated assembly
Summary: Mono crashes when debugging dynamically generated assembly
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: 5.4 (2017-06)
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-30 13:07 UTC by Artem Bukhonov
Modified: 2017-12-04 12:46 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test solution (12.85 KB, application/x-zip-compressed)
2017-11-30 13:07 UTC, Artem Bukhonov
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60928 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Artem Bukhonov 2017-11-30 13:07:03 UTC
Created attachment 25872 [details]
Test solution

When I have a local object which was generated using Moq framework mono just crashes on step.
Tried both on Win and on Mac
Comment 1 Artem Bukhonov 2017-11-30 13:11:21 UTC
P.S. Rider was used for debugging https://www.jetbrains.com/rider/
Comment 2 Artem Bukhonov 2017-11-30 13:26:47 UTC
Crash log on Mac:
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono --debug --debugger-agent=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:55555,setpgid=y "/Users/artem.bukhonov/Library/Application Support/JetBrains/Toolbox/apps/Rider/ch-1/173.3801.677/Rider EAP.app/Contents/lib/ReSharperHost/JetBrains.ReSharper.TaskRunner.CLR45.x64.exe" 127.0.0.1 62909 b8447322-a25b-489e-bfb7-01fb91499255
mono(24498,0x7000017ea000) malloc: *** error for object 0x1422080: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Stacktrace:


Native stacktrace:

        0   mono                                0x000000010107a541 mono_handle_native_crash + 257
        1   libsystem_platform.dylib            0x00007fff76e0ff5a _sigtramp + 26
        2   libsystem_malloc.dylib              0x00007fff76d4e758 tiny_free_no_lock + 570
        3   libsystem_c.dylib                   0x00007fff76c3b30a abort + 127
        4   libsystem_malloc.dylib              0x00007fff76d38866 free + 521
        5   mono                                0x000000010124ff7d mono_error_cleanup + 77
        6   mono                                0x00000001010ad85e type_commands_internal + 7966
        7   mono                                0x000000010109ee3b debugger_thread + 1915
        8   mono                                0x0000000101198463 start_wrapper + 675
        9   libsystem_pthread.dylib             0x00007fff76e196c1 _pthread_body + 340
        10  libsystem_pthread.dylib             0x00007fff76e1956d _pthread_body + 0
        11  libsystem_pthread.dylib             0x00007fff76e18c5d thread_start + 13

Debug info from gdb:

mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 3 Zoltan Varga 2017-12-02 09:38:20 UTC
Which mono version is this ?
Comment 4 Artem Bukhonov 2017-12-04 12:46:59 UTC
Windows: 5.4.1
Mac: 5.4.0.199