Re: [Valgrind-users] Crash under ARM64

2019-04-08 Thread Paulo Matos via Valgrind-users



On 05/04/2019 23:27, Philippe Waroquiers wrote:
> On Fri, 2019-04-05 at 20:53 +0200, Paulo Matos via Valgrind-users wrote:
>> disInstr(arm64): unhandled instruction 0xD538
> ...
>> Could this really be a problem with valgrind, or am I missing something?
>>
>> If I should raise a bug or add more info please let me know.
> 
> Searching on 'disInstr(arm64): unhandled instruction 0xD538'
> points e.g. at https://bugs.kde.org/show_bug.cgi?id=381556
> which is marked as fixed.
> 
> So, first thing to try is to test with the latest release (3.14)
> and/or the GIT version.
> 

Thanks Philippe, you are correct. This is fixed in the last git commit.


-- 
Paulo Matos


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


Re: [Valgrind-users] Crash under ARM64

2019-04-05 Thread Philippe Waroquiers
On Fri, 2019-04-05 at 20:53 +0200, Paulo Matos via Valgrind-users wrote:
> disInstr(arm64): unhandled instruction 0xD538
...
> Could this really be a problem with valgrind, or am I missing something?
> 
> If I should raise a bug or add more info please let me know.

Searching on 'disInstr(arm64): unhandled instruction 0xD538'
points e.g. at https://bugs.kde.org/show_bug.cgi?id=381556
which is marked as fixed.

So, first thing to try is to test with the latest release (3.14)
and/or the GIT version.

Philippe




___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


[Valgrind-users] Crash under ARM64

2019-04-05 Thread Paulo Matos via Valgrind-users
Hi,

In an attempt to investigate a bug in the racket compiler under aarch64,
I got myself an amazon arm machine (a1.xlarge instance) running ubuntu
cosmic.

ubuntu@ip-172-31-16-13:~$ cat /proc/cpuinfo
processor   : 0
BogoMIPS: 166.66
Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part: 0xd08
CPU revision: 3

processor   : 1
BogoMIPS: 166.66
Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part: 0xd08
CPU revision: 3

processor   : 2
BogoMIPS: 166.66
Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part: 0xd08
CPU revision: 3

processor   : 3
BogoMIPS: 166.66
Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part: 0xd08
CPU revision: 3

ubuntu@ip-172-31-16-13:~$ uname -a
Linux ip-172-31-16-13 4.18.0-1008-aws #10-Ubuntu SMP Mon Jan 14 22:12:09
UTC 2019 aarch64 aarch64 aarch64 GNU/Linux


I have then build racket with gcc and ran valgrind on the command line I
know to segfault and got this:
$ valgrind ./racket3m -cqu ../../racket/mksystem.rkt system.rktd "gcc -E
-I. -I../../racket/include -I../../racket/src -g -O2   -DUSE_SENORA_GC
  ../../racket/src/systype.c" "" machine "./racket3m" "./racket3m"
==18997== Memcheck, a memory error detector
==18997== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==18997== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==18997== Command: ./racket3m -cqu ../../racket/mksystem.rkt system.rktd
gcc\ -E\ -I.\ -I../../racket/include\ -I../../racket/src\ -g\ -O2\ \ \
-DUSE_SENORA_GC\ \ \ \ ../../racket/src/systype.c  machine ./racket3m
./racket3m
==18997==
ARM64 front end: branch_etc
disInstr(arm64): unhandled instruction 0xD538
disInstr(arm64): 1101'0101 0011'1000 ' '
==18997== valgrind: Unrecognised instruction at address 0x40148e0.
==18997==at 0x40148E0: init_cpu_features (cpu-features.c:70)
==18997==by 0x40148E0: dl_platform_init (dl-machine.h:208)
==18997==by 0x40148E0: _dl_sysdep_start (dl-sysdep.c:231)
==18997==by 0x4001883: _dl_start_final (rtld.c:415)
==18997==by 0x4001AFF: _dl_start (rtld.c:524)
==18997==by 0x4001047: ??? (in /lib/aarch64-linux-gnu/ld-2.28.so)
==18997== Your program just tried to execute an instruction that Valgrind
==18997== did not recognise.  There are two possible reasons for this.
==18997== 1. Your program has a bug and erroneously jumped to a non-code
==18997==location.  If you are running Memcheck and you just saw a
==18997==warning about a bad jump, it's probably your program's fault.
==18997== 2. The instruction is legitimate but Valgrind doesn't handle it,
==18997==i.e. it's Valgrind's fault.  If you think this is the case or
==18997==you are not sure, please let us know and we'll try to fix it.
==18997== Either way, Valgrind will now raise a SIGILL signal which will
==18997== probably kill your program.
==18997==
==18997== Process terminating with default action of signal 4 (SIGILL)
==18997==  Illegal opcode at address 0x40148E0
==18997==at 0x40148E0: init_cpu_features (cpu-features.c:70)
==18997==by 0x40148E0: dl_platform_init (dl-machine.h:208)
==18997==by 0x40148E0: _dl_sysdep_start (dl-sysdep.c:231)
==18997==by 0x4001883: _dl_start_final (rtld.c:415)
==18997==by 0x4001AFF: _dl_start (rtld.c:524)
==18997==by 0x4001047: ??? (in /lib/aarch64-linux-gnu/ld-2.28.so)
==18997==
==18997== HEAP SUMMARY:
==18997== in use at exit: 0 bytes in 0 blocks
==18997==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==18997==
==18997== All heap blocks were freed -- no leaks are possible
==18997==
==18997== For counts of detected and suppressed errors, rerun with: -v
==18997== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Illegal instruction (core dumped)


Could this really be a problem with valgrind, or am I missing something?

If I should raise a bug or add more info please let me know.

-- 
Paulo Matos


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users