Repository: godot
Issue: SIGSEGV Crash on Linux when using an external C# Library
Labels: bug,topic:dotnet,crash

**Godot version:** v3.3.1 Mono

**Issue description:**
I am trying to use an ENet library in Godot (https://github.com/nxrighthere/ENet-CSharp).
This library use one managed dll and native dlls. When using them inside Godot (with .NET Framework 4.7.2) everything work in windows (Editor & Export) but when on Linux (also Editor & Build) using the `Host.Create()` function will cause a sigsegv crash. I use Manjaro Linux, and tested it on a Virtual Machine and on a Real Installation.
I have made a simple console c# app also with .NET Framework 4.7.2 & Mono, and it worked perfectly so I assume this come from Godot itself and not from the library.


**Steps to reproduce:**
Add the Managed & Natives dll from the release tab of the original git repo to the root of your Godot project. Import as a reference in your IDE. Try to call `Host.Create()` on Linux. Work perfectly on windows but will cause a SIGSEGV on Linux

**Minimal reproduction project:**
Contains a sample project. I also include the SIGSEGV Crash and the Mono crash log.
Build where made from the default export template. Building on Linux or Windows editor change nothing

The SIGSEGV : 

```
=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0xb8e86b - ./enet-crash.x86_64 : 
	0xb8ebf9 - ./enet-crash.x86_64 : 
	0xb818bf - ./enet-crash.x86_64 : 
	0xaf9069 - ./enet-crash.x86_64 : 
	0x24c6b60 - ./enet-crash.x86_64 : enet_peer_reset_queues
	0x7f71b0118bcf - /home/lucas/Desktop/New Folder/libenet.so : enet_host_create
	0x40bb5408 - Unknown

=================================================================
	Telemetry Dumper:
=================================================================
Could not exec mono-hang-watchdog, expected on path '/home/lucas/Desktop/New Folder/data_enet-crash/Mono/etc/../bin/mono-hang-watchdog' (errno 2)
Pkilling 0x140126183396928x from 0x140127769492864x
Entering thread summarizer pause from 0x140127769492864x
Finished thread summarizer pause from 0x140127769492864x.
Failed to create breadcrumb file (null)/crash_hash_0x59998c7bd

Waiting for dumping threads to resume

=================================================================
	External Debugger Dump:
=================================================================
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x24c6b60):0x24c6b50  e8 00 00 00 48 39 ef 74 26 0f 1f 80 00 00 00 00  ....H9.t&.......
0x24c6b60  48 8b 57 08 48 8b 07 48 89 02 48 89 50 08 e8 9d  H.W.H..H..H.P...
0x24c6b70  b2 ea ff 48 8b bb e8 00 00 00 48 39 ef 75 e1 48  ...H......H9.u.H
0x24c6b80  8d bb f8 00 00 00 e8 35 ff ff ff 48 8d bb 08 01  .......5...H....

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at ENet.Native:enet_host_create <0x000a7>
	  at ENet.Host:Create <0x0015f>
	  at ENet.Host:Create <0x0003b>
	  at ENet.Host:Create <0x0002f>
	  at ENetManager:Host <0x0028b>
	  at System.Object:runtime_invoke_void__this__ <0x00071>
==================

===============================================
Aborted (core dumped)
```
[mono-crash.zip](https://github.com/godotengine/godot/files/6566553/mono-crash.zip)
[enet-crash-project.zip](https://github.com/godotengine/godot/files/6566555/enet-crash-project.zip)