malloc() memory corruption error building CppSharp, mono / linux

62 views
Skip to first unread message

William Webber

unread,
May 24, 2016, 7:47:45 AM5/24/16
to CppSharp
Summary: I get a malloc() memory corruption error from CSharp.Gen.Exe when trying to build CppSharp under Ubuntu 16.04.

Setup:

* Ubuntu 16.04, updated as of today
* Latest mono packages from download.mono-project.com (Mono JIT compiler version 4.2.3 (Stable 4.2.3.4/832de4b Wed Mar 16 13:19:08 UTC 2016)
** Same error occurred with Ubuntu default mono version
* gcc 5.3.1

Steps:

* git clone
* ./premake5-linux-64 --file=scripts/LLVM.lua download_llvm
* ./premake5-linux-64 gmake
* make -C gmake config=release_x64

Output at point of error:

==== Building CSharp.CSharp (release_x64) ====
Running prebuild commands
mono --debug "../lib/Release_x64/CSharp.Gen.exe"

Generating bindings for CSharp (CSharp)
Looking for tests in: /home/wew/dev/netprojects/CppSharp/tests/CSharp
*** Error in `mono': malloc(): memory corruption: 0x0000000002f4c5c0 ***

(actual memory address varies between runs).

As suggested in another thread, I re-ran with

   $ MONO_LOG_LEVEL=debug mono --debug "../lib/Release_x64/CSharp.Gen.exe"

and full output can be found in:

http://pastebin.com/7n19gyfW

Any help appreciated!

Thanks,

William

João Matos

unread,
May 27, 2016, 6:47:50 AM5/27/16
to William Webber, CppSharp
Hi,

Please create an issue in Github instead, we're moving away from this list.

Unfortunately, the interesting part of the log does not show.

  1. Could not attach to process.  If your uid matches the uid of the target
  2. process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
  3. again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
  4. ptrace: Operation not permitted.

You have to enable ptrace for your user so GDB can properly attach to the process.

Then try that and send the log again.



--
You received this message because you are subscribed to the Google Groups "CppSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cppsharp-lis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
João Matos
Reply all
Reply to author
Forward
0 new messages