2017-09-07 1 views
0

Ich habe ein Problem damit, Mono auf Arti710 zu verwenden. Ich habe das Paket "mono-devel" von Fedora 24 installiert und DNF sagt, dass alles in Ordnung ist. Aber wenn ich versuche, ein Minimum "Hallo Welt" Programm mit MCS zu kompilieren, bekomme ich einen Segmentierungsfehler.
Auch, wenn ich das Programm auf einem PC kompiliere und versuche, es auf dem Artik710 mit "mono hallo.exe" auszuführen, bekomme ich auch einen Segmentierungsfehler.
einfach "mono -V" arbeitet und sagt:Mono auf Artik710

Mono JIT compiler version 4.2.4 (tarball Thu Jun 23 19:09:56 UTC 2016) 
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com 
    TLS:   __thread 
    SIGSEGV:  normal 
    Notifications: epoll 
    Architecture: armel,vfp+hard 
    Disabled:  none 
    Misc:   softdebug 
    LLVM:   supported, not enabled. 
    GC:   sgen 

Ich gehe davon aus, dass dieses Problem durch Ausführen von 32-Bit-Betriebssystem verursacht (und so 32-Bit Mono) auf 64-Bit Cortex A-53-Core-Prozessor. Die Frage ist also - gibt es eine Möglichkeit, x64 Mono auf 32-Bit-Betriebssystem zu installieren (oder aus Quellcode zu erstellen) und gibt es irgendeine Möglichkeit, dass es funktioniert? Oder ein Problem mit etwas anderem? Hier ist einige Stack-Trace von Gdb ausgeführt Hallo Welt-Programm (nicht sehr hilfreich):

Vielen Dank für jede Hilfe!

Hinweise:

Unter valgrind Werkzeug mein "Hallo Welt" Programm debuggen funktioniert actualy in mono. Wenn ich also "mono /root/Release/HelloWorldArtik.exe" starte, wird nur "Segmentation failed (core dumped)" zurückgegeben. Aber wenn ich laufen "valgrind --tool = memcheck -v --leak-Check = full --smc-check = alle mono /root/Release/HelloWorldArtik.exe", die Rückkehr ist:

--2632-- Contents of /proc/version: 
--2632-- Linux version 4.4.71-0710GC0F-44F-01QC ([email protected]) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #1 SMP PREEMPT Thu Jul 13 19:58:14 KST 2017 
--2632-- Arch and hwcaps: ARM, LittleEndian, ARMv7-neon-vfp 
--2632-- Page sizes: currently 4096, max supported 4096 
--2632-- Reading syms from /usr/bin/mono-sgen 
--2632-- Considering /usr/lib/debug/.build-id/03/d41817d1bf496a1e9fbb96dcbaf91dca2f2a36.debug .. 
--2632-- .. build-id is valid 
--2632-- Considering /usr/lib/debug/.build-id/be/69fde943ee25e3d503d6e9298eca48dfbb1696.debug .. 
--2632-- .. build-id is valid 
--2632-- Warning: cross-CU LIMITATION: some inlined fn names 
--2632-- might be shown as UnknownInlinedFun 
--2632-- Reading syms from /usr/lib/ld-2.23.so 
--2632-- Considering /usr/lib/debug/usr/lib/ld-2.23.so.debug .. 
--2632-- .. CRC mismatch (computed 8c51544a wanted a0a8f5fa) 
--2632-- Reading EXIDX entries: 147 available 
==2632== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10 
==2632== Warning: whilst reading EXIDX: ExtabEntryDecode: failed with error code: -10 
(a lot of same warnings and redirections) 
Reading EXIDX entries: 2018 attempted, 1836 successful 
--2632-- REDIR: 0x49df1c0 (libc.so.6:memcpy) redirected to 0x4831690 (_vgnU_ifunc_wrapper) 
--2632-- REDIR: 0x49deec0 (libc.so.6:memset) redirected to 0x484df08 (memset) 
--2632-- REDIR: 0x49e75c0 (libc.so.6:__memcpy_neon) redirected to 0x484be9c (memcpy) 
--2632-- REDIR: 0x49dd5f0 (libc.so.6:rindex) redirected to 0x4849a4c (rindex) 
--2632-- REDIR: 0x49dd241 (libc.so.6:strlen) redirected to 0x484a23c (strlen) 
--2632-- REDIR: 0x49dc8b1 (libc.so.6:strcmp) redirected to 0x484b48c (strcmp) 
--2632-- REDIR: 0x49dd464 (libc.so.6:strncmp) redirected to 0x484ab74 (strncmp) 
--2632-- REDIR: 0x49dc7c0 (libc.so.6:index) redirected to 0x4849c9c (index) 
--2632-- REDIR: 0x49de5b1 (libc.so.6:memchr) redirected to 0x484b75c (memchr) 
--2632-- REDIR: 0x49e104c (libc.so.6:strchrnul) redirected to 0x484e8e0 (strchrnul) 
--2632-- REDIR: 0x49d6f58 (libc.so.6:malloc) redirected to 0x48464f8 (malloc) 
--2632-- REDIR: 0x49d72b8 (libc.so.6:free) redirected to 0x4847b38 (free) 
--2632-- REDIR: 0x49d7978 (libc.so.6:calloc) redirected to 0x4848c40 (calloc) 
--2632-- REDIR: 0x49dd5a0 (libc.so.6:strncpy) redirected to 0x484a634 (strncpy) 
--2632-- REDIR: 0x49d7394 (libc.so.6:realloc) redirected to 0x4848eac (realloc) 
--2632-- REDIR: 0x49dcbc0 (libc.so.6:strcpy) redirected to 0x484a3fc (strcpy) 
--2632-- REDIR: 0x49dc79c (libc.so.6:strcat) redirected to 0x4849ddc (strcat) 
--2632-- REDIR: 0x49deb80 (libc.so.6:memmove) redirected to 0x484dfd0 (memmove) 
--2632-- REDIR: 0x49ddf74 (libc.so.6:strstr) redirected to 0x484f254 (strstr) 
--2632-- REDIR: 0x49e0fc0 (libc.so.6:rawmemchr) redirected to 0x484e918 (rawmemchr) 
--2632-- REDIR: 0x49dd31c (libc.so.6:strnlen) redirected to 0x484a184 (strnlen) 
--2632-- REDIR: 0x49dcbb0 (libc.so.6:stpcpy) redirected to 0x484d72c (stpcpy) 
--2632-- REDIR: 0x49df0bc (libc.so.6:strcasecmp_l) redirected to 0x484b0b4 (strcasecmp_l) 
--2632-- REDIR: 0x49de64c (libc.so.6:bcmp) redirected to 0x484d5b4 (bcmp) 
--2632-- memcheck GC: 1000 nodes, 0 survivors (0.0%) 
Hello, world! From Artik 710 (this is program output) 
==2632== 
==2632== HEAP SUMMARY: 
==2632==  in use at exit: 12,271 bytes in 330 blocks 
==2632== total heap usage: 44,241 allocs, 43,911 frees, 15,597,707 bytes allocated 
==2632== 
==2632== Searching for pointers to 330 not-freed blocks 
==2632== Checked 23,350,064 bytes 
==2632== 
==2632== 8 bytes in 1 blocks are definitely lost in loss record 9 of 297 
==2632== at 0x4846584: malloc (vg_replace_malloc.c:299) 
==2632== by 0x336A43: monoeg_malloc (gmem.c:73) 
==2632== by 0x25958F: mono_metadata_type_dup (metadata.c:5048) 
==2632== by 0x1BB0AF: get_shared_gparam (mini-generic-sharing.c:2850) 
==2632== by 0x1BB2EF: UnknownInlinedFun (mini-generic-sharing.c:2915) 
==2632== by 0x1BB2EF: get_shared_inst.isra.15 (mini-generic-sharing.c:2939) 
==2632== by 0x1BD117: mini_get_shared_method_full (mini-generic-sharing.c:2997) 
==2632== by 0x132943: lookup_method (mini-runtime.c:1763) 
==2632== by 0x1329EB: mono_jit_compile_method_with_opt (mini-runtime.c:1868) 
==2632== by 0x133437: mono_jit_runtime_invoke (mini-runtime.c:2179) 
==2632== by 0x2ABA7B: mono_runtime_invoke (object.c:2783) 
==2632== by 0x2ABF23: mono_runtime_class_init_full (object.c:367) 
==2632== by 0x15CF67: mono_method_to_ir (method-to-ir.c:11237) 
(and so on) 

LEAK SUMMARY: 
==2632== definitely lost: 746 bytes in 29 blocks 
==2632== indirectly lost: 0 bytes in 0 blocks 
==2632==  possibly lost: 288 bytes in 2 blocks 
==2632== still reachable: 11,237 bytes in 299 blocks 
==2632==   suppressed: 0 bytes in 0 blocks 
==2632== Reachable blocks (those to which a pointer was found) are not shown. 
==2632== To see them, rerun with: --leak-check=full --show-leak-kinds=all 
==2632== 
==2632== ERROR SUMMARY: 22 errors from 22 contexts (suppressed: 0 from 0) 
==2632== ERROR SUMMARY: 22 errors from 22 contexts (suppressed: 0 from 0) 

Could jemand bitte bitte für mich klären, was das alles bedeutet?

Antwort

0

Verwenden Sie das Valgrind-Tool, um nach ungültigem Lesen und Schreiben zu suchen. Dadurch erhalten Sie die richtigen Informationen.