|
From: Anil S. <ani...@li...> - 2014-02-17 07:48:47
|
Hi Valgrind Developers, My name is Anil Singhar and recently I was trying to use valgrind on aarch64 foundation model and started off with the basic sanity test recommended in the README file: "valgrind ls -l". Could anyone please help me understand if this is something that need to be addressed within valgrind or elsewhere..? i.e. if valgrind detects unrecognized instruction, does that mean the architecture (new ISA) is not yet supported or the program (in this case "ls -l") actually spat out a wrong instruction? The later seems less likely because ls -l works without valgrind. Am I right? Thanks and Regards, Anil (Note: I have built valgrind using bitbake and used the generated .ipk files to install valgrind on the foundation model, which is a aarch64 simulator. My host system is x86 based Ubuntu machine). ---------------------------------------------------------------------------- -------------- Here is a snipped output ------------------------- ---------------------------------------------------------------------------- root@genericarmv8:~/3.9.99-r13801-r8# valgrind ls -l ==1747== Memcheck, a memory error detector ==1747== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==1747== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==1747== Command: ls -l ==1747== ==1747== Use of uninitialised value of size 8 . . . ==1747== ARM64 front end: branch_etc disInstr(arm64): unhandled instruction 0xD53B00E3 disInstr(arm64): 1101'0101 0011'1011 0000'0000 1110'0011 ==1747== valgrind: Unrecognised instruction at address 0x4016284. ==1747== at 0x4016284: memset (memset.S:175) ==1747== by 0x4005DCF: _dl_map_object_from_fd (dl-load.c:1387) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== Your program just tried to execute an instruction that Valgrind ==1747== did not recognise. There are two possible reasons for this. ==1747== 1. Your program has a bug and erroneously jumped to a non-code ==1747== location. If you are running Memcheck and you just saw a ==1747== warning about a bad jump, it's probably your program's fault. ==1747== 2. The instruction is legitimate but Valgrind doesn't handle it, ==1747== i.e. it's Valgrind's fault. If you think this is the case or ==1747== you are not sure, please let us know and we'll try to fix it. ==1747== Either way, Valgrind will now raise a SIGILL signal which will ==1747== probably kill your program. ==1747== ==1747== Process terminating with default action of signal 4 (SIGILL) ==1747== Illegal opcode at address 0x4016284 ==1747== at 0x4016284: memset (memset.S:175) ==1747== by 0x4005DCF: _dl_map_object_from_fd (dl-load.c:1387) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== Jump to the invalid address stated on the next line ==1747== at 0x5C0: ??? ==1747== Address 0x5c0 is not stack'd, malloc'd or (recently) free'd ==1747== ==1747== ==1747== Process terminating with default action of signal 11 (SIGSEGV) ==1747== Bad permissions for mapped region at address 0x5C0 ==1747== at 0x5C0: ??? ==1747== ==1747== HEAP SUMMARY: ==1747== in use at exit: 0 bytes in 0 blocks ==1747== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==1747== ==1747== All heap blocks were freed -- no leaks are possible ==1747== ==1747== For counts of detected and suppressed errors, rerun with: -v ==1747== Use --track-origins=yes to see where uninitialised values come from ==1747== ERROR SUMMARY: 70 errors from 34 contexts (suppressed: 27 from 27) Segmentation fault ch64.ipk2C2C^Cmv8:~/3.9.99-r13801-r8# ----------------- Here is the complete output -------------------- root@genericarmv8:~/3.9.99-r13801-r8# valgrind ls -l ==1747== Memcheck, a memory error detector ==1747== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==1747== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==1747== Command: ls -l ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40163F0: memcpy (memcpy.S:68) ==1747== by 0x40076DB: _dl_map_object (dl-load.c:2302) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40163F4: memcpy (memcpy.S:69) ==1747== by 0x40076DB: _dl_map_object (dl-load.c:2302) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4016414: memcpy (memcpy.S:81) ==1747== by 0x40076DB: _dl_map_object (dl-load.c:2302) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x401641C: memcpy (memcpy.S:83) ==1747== by 0x40076DB: _dl_map_object (dl-load.c:2302) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40098EC: _dl_new_object (dl-object.c:81) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40163F0: memcpy (memcpy.S:68) ==1747== by 0x40098FB: _dl_new_object (dl-object.c:87) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40163F4: memcpy (memcpy.S:69) ==1747== by 0x40098FB: _dl_new_object (dl-object.c:87) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4016414: memcpy (memcpy.S:81) ==1747== by 0x40098FB: _dl_new_object (dl-object.c:87) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x401641C: memcpy (memcpy.S:83) ==1747== by 0x40098FB: _dl_new_object (dl-object.c:87) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40098FC: _dl_new_object (dl-object.c:92) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009904: _dl_new_object (dl-object.c:87) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009A88: _dl_new_object (dl-object.c:96) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009924: _dl_new_object (dl-object.c:97) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009968: _dl_new_object (dl-object.c:116) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009978: _dl_new_object (dl-object.c:124) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009998: _dl_new_object (dl-object.c:135) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40099C0: _dl_new_object (dl-object.c:146) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x40163F4: memcpy (memcpy.S:69) ==1747== by 0x4016353: mempcpy (mempcpy.c:30) ==1747== by 0x4009ACF: _dl_new_object (dl-object.c:205) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x401641C: memcpy (memcpy.S:83) ==1747== by 0x4016353: mempcpy (mempcpy.c:30) ==1747== by 0x4009ACF: _dl_new_object (dl-object.c:205) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009AD8: _dl_new_object (dl-object.c:211) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009AF0: _dl_new_object (dl-object.c:216) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4009AF4: _dl_new_object (dl-object.c:219) ==1747== by 0x4005B7F: _dl_map_object_from_fd (dl-load.c:1053) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005BA8: _dl_map_object_from_fd (dl-load.c:1065) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005C50: _dl_map_object_from_fd (dl-load.c:1103) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005C90: _dl_map_object_from_fd (dl-load.c:1103) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005D10: _dl_map_object_from_fd (dl-load.c:1287) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005D2C: _dl_map_object_from_fd (dl-load.c:1298) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005D38: _dl_map_object_from_fd (dl-load.c:1311) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005D54: _dl_map_object_from_fd (dl-load.c:1347) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4006388: _dl_map_object_from_fd (dl-load.c:1354) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005E14: _dl_map_object_from_fd (dl-load.c:1338) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005D60: _dl_map_object_from_fd (dl-load.c:1349) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ==1747== Use of uninitialised value of size 8 ==1747== at 0x4005D7C: _dl_map_object_from_fd (dl-load.c:1363) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== ARM64 front end: branch_etc disInstr(arm64): unhandled instruction 0xD53B00E3 disInstr(arm64): 1101'0101 0011'1011 0000'0000 1110'0011 ==1747== valgrind: Unrecognised instruction at address 0x4016284. ==1747== at 0x4016284: memset (memset.S:175) ==1747== by 0x4005DCF: _dl_map_object_from_fd (dl-load.c:1387) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== Your program just tried to execute an instruction that Valgrind ==1747== did not recognise. There are two possible reasons for this. ==1747== 1. Your program has a bug and erroneously jumped to a non-code ==1747== location. If you are running Memcheck and you just saw a ==1747== warning about a bad jump, it's probably your program's fault. ==1747== 2. The instruction is legitimate but Valgrind doesn't handle it, ==1747== i.e. it's Valgrind's fault. If you think this is the case or ==1747== you are not sure, please let us know and we'll try to fix it. ==1747== Either way, Valgrind will now raise a SIGILL signal which will ==1747== probably kill your program. ==1747== ==1747== Process terminating with default action of signal 4 (SIGILL) ==1747== Illegal opcode at address 0x4016284 ==1747== at 0x4016284: memset (memset.S:175) ==1747== by 0x4005DCF: _dl_map_object_from_fd (dl-load.c:1387) ==1747== by 0x4007757: _dl_map_object (dl-load.c:2369) ==1747== by 0x4001127: map_doit (rtld.c:627) ==1747== by 0x400CD97: _dl_catch_error (dl-error.c:177) ==1747== by 0x4000CE3: do_preload (rtld.c:816) ==1747== by 0x4003293: dl_main (rtld.c:1630) ==1747== by 0x4012FAF: _dl_sysdep_start (dl-sysdep.c:249) ==1747== by 0x4001503: _dl_start_final (rtld.c:332) ==1747== by 0x400440B: _dl_start (rtld.c:560) ==1747== by 0x4000F07: ??? (in /lib/ld-2.18-2013.10.so) ==1747== Jump to the invalid address stated on the next line ==1747== at 0x5C0: ??? ==1747== Address 0x5c0 is not stack'd, malloc'd or (recently) free'd ==1747== ==1747== ==1747== Process terminating with default action of signal 11 (SIGSEGV) ==1747== Bad permissions for mapped region at address 0x5C0 ==1747== at 0x5C0: ??? ==1747== ==1747== HEAP SUMMARY: ==1747== in use at exit: 0 bytes in 0 blocks ==1747== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==1747== ==1747== All heap blocks were freed -- no leaks are possible ==1747== ==1747== For counts of detected and suppressed errors, rerun with: -v ==1747== Use --track-origins=yes to see where uninitialised values come from ==1747== ERROR SUMMARY: 70 errors from 34 contexts (suppressed: 27 from 27) Segmentation fault ch64.ipk2C2C^Cmv8:~/3.9.99-r13801-r8# |
|
From: Julian S. <js...@ac...> - 2014-02-17 11:20:32
|
Anil, Support for aarch64 is under active development. V can run large amounts of integer and FP code -- basically anything that gcc-4.8.2 -O2 generates -- and SIMD support is in progress. I suspect you have run across an unsupported SIMD instruction in handwritten assembly code for memset: > ==1747== valgrind: Unrecognised instruction at address 0x4016284. > ==1747== at 0x4016284: memset (memset.S:175) Can you use objdump to find the instruction? Try running with the flags -v --sym-offsets=yes -- you can maybe deduce from that output in which shared object the instruction is (ld.so or glibc.so) and where it is relative to the start of the function. J |
|
From: Anil S. <ani...@li...> - 2014-02-17 11:55:37
|
Hi Julian,
Thanks for your response. I did objdump on "/lib/ld-2.18-2013.10.so", and
the instruction seems to be the "*mrs x3, dczid_el0*" (status reg
inst.), . The offset is 0x16284 (the unhandled instruction is reported at
0x4016284).
Thanks and Regards,
Anil
. . .
1622c: a9021d07 stp x7, x7,
[x8,#32]
stp A_l, A_l, [dst,
#48]
16230: a9031d07 stp x7, x7,
[x8,#48]
stp A_l, A_l, [dst,
#64]!
16234: a9841d07 stp x7, x7,
[x8,#64]!
subs count, count,
#64
16238: f1010042 subs x2, x2,
#0x40
b.ge
1b
1623c: 54ffff6a b.ge 16228
<_dl_var_init+0x26c8>
tst count,
#0x3f
16240: f240145f tst x2,
#0x3f
add dst, dst,
#16
16244: 91004108 add x8, x8,
#0x10
b.ne
L(tail63)
16248: 54fffb01 b.ne 161a8
<_dl_var_init+0x2648>
RET
1624c: d65f03c0
ret
#ifndef
DONT_USE_DC
/* For zeroing memory, check to see if we can use the ZVA feature
to
* zero entire 'cache' lines.
*/
L(zero_mem):
mov A_l, #0
16250: d2800007 mov x7, #0x0 //
#0
cmp count,
#63
16254: f100fc5f cmp x2,
#0x3f
b.le
L(tail_maybe_tiny)
16258: 54fffa4d b.le 161a0
<_dl_var_init+0x2640>
neg tmp2,
dst
1625c: cb0803e4 neg x4,
x8
ands tmp2, tmp2,
#15
16260: f2400c84 ands x4, x4,
#0xf
b.eq
1f
16264: 540000c0 b.eq 1627c
<_dl_var_init+0x271c>
sub count, count,
tmp2
16268: cb040042 sub x2, x2,
x4
stp A_l, A_l,
[dst]
1626c: a9001d07 stp x7, x7,
[x8]
add dst, dst,
tmp2
16270: 8b040108 add x8, x8,
x4
cmp count,
#63
16274: f100fc5f cmp x2,
#0x3f
b.le
L(tail63)
16278: 54fff98d b.le 161a8
<_dl_var_init+0x2648>
1:
/* For zeroing small amounts of memory, it's not worth setting up
* the line-clear code.
*/
cmp count,
#128
1627c: f102005f cmp x2,
#0x80
b.lt
L(not_short)
16280: 54fffc0b b.lt 16200
<_dl_var_init+0x26a0>
mov tmp3w,
#4
and zva_len, tmp1w, #15 /* Safety: other bits reserved.
*/
lsl zva_len, tmp3w,
zva_len
str zva_len, [tmp2,
#:lo12:L(cache_clear)]
#else
mrs tmp1,
dczid_el0
* 16284: d53b00e3 mrs x3, dczid_el0 *
tbnz tmp1, #4,
L(not_short)
16288: 3727fbc3 tbnz w3, #4, 16200
<_dl_var_init+0x26a0>
mov tmp3w,
#4
1628c: 52800089 mov w9, #0x4 //
#4
and zva_len, tmp1w, #15 /* Safety: other bits reserved.
*/
16290: 12000c65 and w5, w3, #0xf
lsl zva_len, tmp3w,
zva_len
16294: 1ac52125 lsl w5, w9,
w5
#endif
. . .
On 17 February 2014 16:50, Julian Seward <js...@ac...> wrote:
>
> Anil,
>
> Support for aarch64 is under active development. V can run large
> amounts of integer and FP code -- basically anything that
> gcc-4.8.2 -O2 generates -- and SIMD support is in progress.
>
> I suspect you have run across an unsupported SIMD instruction in
> handwritten assembly code for memset:
>
> > ==1747== valgrind: Unrecognised instruction at address 0x4016284.
> > ==1747== at 0x4016284: memset (memset.S:175)
>
> Can you use objdump to find the instruction? Try running with the flags
> -v --sym-offsets=yes -- you can maybe deduce from that output in which
> shared object the instruction is (ld.so or glibc.so) and where it is
> relative to the start of the function.
>
> J
>
>
|
|
From: Anil S. <ani...@li...> - 2014-02-18 04:59:35
|
Hi Julian, Any further update on if "mrs" with 64 bit registers is supported yet..? My intention was to verify the functionality on aarch64 and if possible fix some existing issues. I work for Linaro Enterprise Group. If you have some aarch64 related tasks to be done for Valgrind at hand, which are not already assigned, you may assign them to me. Thanks and Regards, Anil On 17 February 2014 17:25, Anil Singhar <ani...@li...> wrote: > Hi Julian, > > Thanks for your response. I did objdump on "/lib/ld-2.18-2013.10.so", and > the instruction seems to be the "*mrs x3, dczid_el0*" (status reg > inst.), . The offset is 0x16284 (the unhandled instruction is reported at > 0x4016284). > > Thanks and Regards, > Anil > . . . > > 1622c: a9021d07 stp x7, x7, > [x8,#32] > stp A_l, A_l, [dst, > #48] > 16230: a9031d07 stp x7, x7, > [x8,#48] > stp A_l, A_l, [dst, > #64]! > 16234: a9841d07 stp x7, x7, > [x8,#64]! > subs count, count, > #64 > 16238: f1010042 subs x2, x2, > #0x40 > b.ge > 1b > 1623c: 54ffff6a b.ge 16228 > <_dl_var_init+0x26c8> > tst count, > #0x3f > 16240: f240145f tst x2, > #0x3f > add dst, dst, > #16 > 16244: 91004108 add x8, x8, > #0x10 > b.ne > L(tail63) > 16248: 54fffb01 b.ne 161a8 > <_dl_var_init+0x2648> > > RET > 1624c: d65f03c0 > ret > > > #ifndef > DONT_USE_DC > /* For zeroing memory, check to see if we can use the ZVA feature > to > * zero entire 'cache' lines. > */ > L(zero_mem): > > mov A_l, #0 > 16250: d2800007 mov x7, #0x0 // > #0 > cmp count, > #63 > 16254: f100fc5f cmp x2, > #0x3f > b.le > L(tail_maybe_tiny) > 16258: 54fffa4d b.le 161a0 > <_dl_var_init+0x2640> > neg tmp2, > dst > 1625c: cb0803e4 neg x4, > x8 > ands tmp2, tmp2, > #15 > 16260: f2400c84 ands x4, x4, > #0xf > b.eq > 1f > 16264: 540000c0 b.eq 1627c > <_dl_var_init+0x271c> > sub count, count, > tmp2 > 16268: cb040042 sub x2, x2, > x4 > stp A_l, A_l, > [dst] > 1626c: a9001d07 stp x7, x7, > [x8] > add dst, dst, > tmp2 > 16270: 8b040108 add x8, x8, > x4 > cmp count, > #63 > 16274: f100fc5f cmp x2, > #0x3f > b.le > L(tail63) > 16278: 54fff98d b.le 161a8 > <_dl_var_init+0x2648> > 1: > > /* For zeroing small amounts of memory, it's not worth setting up > * the line-clear code. > */ > cmp count, > #128 > 1627c: f102005f cmp x2, > #0x80 > b.lt > L(not_short) > 16280: 54fffc0b b.lt 16200 > <_dl_var_init+0x26a0> > mov tmp3w, > #4 > and zva_len, tmp1w, #15 /* Safety: other bits reserved. > */ > lsl zva_len, tmp3w, > zva_len > str zva_len, [tmp2, > #:lo12:L(cache_clear)] > #else > > mrs tmp1, > dczid_el0 > * 16284: d53b00e3 mrs x3, dczid_el0 * > > tbnz tmp1, #4, > L(not_short) > 16288: 3727fbc3 tbnz w3, #4, 16200 > <_dl_var_init+0x26a0> > mov tmp3w, > #4 > 1628c: 52800089 mov w9, #0x4 // > #4 > and zva_len, tmp1w, #15 /* Safety: other bits reserved. > */ > 16290: 12000c65 and w5, w3, #0xf > lsl zva_len, tmp3w, > zva_len > 16294: 1ac52125 lsl w5, w9, > w5 > #endif > > . . . > > > > > > > > > > > > On 17 February 2014 16:50, Julian Seward <js...@ac...> wrote: > >> >> Anil, >> >> Support for aarch64 is under active development. V can run large >> amounts of integer and FP code -- basically anything that >> gcc-4.8.2 -O2 generates -- and SIMD support is in progress. >> >> I suspect you have run across an unsupported SIMD instruction in >> handwritten assembly code for memset: >> >> > ==1747== valgrind: Unrecognised instruction at address 0x4016284. >> > ==1747== at 0x4016284: memset (memset.S:175) >> >> Can you use objdump to find the instruction? Try running with the flags >> -v --sym-offsets=yes -- you can maybe deduce from that output in which >> shared object the instruction is (ld.so or glibc.so) and where it is >> relative to the start of the function. >> >> J >> >> > |
|
From: Julian S. <js...@ac...> - 2014-02-18 11:50:39
|
On 02/18/2014 05:59 AM, Anil Singhar wrote: > Any further update on if "mrs" with 64 bit registers is supported yet..? mrs/msr is partially supported, to and from the following system registers: tpidr_el0 fpcr fpsr nzcv But I have not seen any uses with dczid_el0 until your mail. Can you please send me (by private email) a copy of your /lib/ld-2.18-2013.10.so so I can have a look at the instructions in context? J |
|
From: Anil S. <ani...@li...> - 2014-02-20 17:49:44
|
Index: priv/guest_arm64_toIR.c
===================================================================
--- priv/guest_arm64_toIR.c (revision 2814)
+++ priv/guest_arm64_toIR.c (working copy)
@@ -621,6 +621,7 @@
#define OFFB_CC_NDEP offsetof(VexGuestARM64State,guest_CC_NDEP)
#define OFFB_TPIDR_EL0 offsetof(VexGuestARM64State,guest_TPIDR_EL0)
+#define OFFB_DCZID_EL0 offsetof(VexGuestARM64State,guest_DCZID_EL0)
#define OFFB_NRADDR offsetof(VexGuestARM64State,guest_NRADDR)
#define OFFB_Q0 offsetof(VexGuestARM64State,guest_Q0)
@@ -4289,6 +4290,25 @@
}
return True;
}
+
+ /* Only handles the case where the system register is DCZID_EL0.
+ 0xD51B00 0E0 Rt MSR dczid_el0, rT
+ 0xD53B00 0E0 Rt MRS rT, dczid_el0
+ */
+ if ( (INSN(31,0) & 0xFFFFFFE0) == 0xD51B00E0 /*MSR*/
+ || (INSN(31,0) & 0xFFFFFFE0) == 0xD53B00E0 /*MRS*/) {
+ Bool toSys = INSN(21,21) == 0;
+ UInt tt = INSN(4,0);
+ if (toSys) {
+ stmt( IRStmt_Put( OFFB_DCZID_EL0, getIReg64orZR(tt)) );
+ DIP("msr dczid_el0, %s\n", nameIReg64orZR(tt));
+ } else {
+ putIReg64orZR(tt, IRExpr_Get( OFFB_DCZID_EL0, Ity_I64 ));
+ DIP("mrs %s, dczid_el0\n", nameIReg64orZR(tt));
+ }
+ return True;
+ }
+
/* Cases for FPCR
0xD51B44 000 Rt MSR fpcr, rT
0xD53B44 000 Rt MSR rT, fpcr
Index: switchback/switchback.c
===================================================================
--- switchback/switchback.c (revision 2814)
+++ switchback/switchback.c (working copy)
@@ -388,7 +388,8 @@
assert(offsetof(VexGuestARM64State, guest_X30) == 16 + 8*30);
assert(offsetof(VexGuestARM64State, guest_SP) == 16 + 8*31);
assert(offsetof(VexGuestARM64State, guest_TPIDR_EL0) == 16 + 8*37);
- assert(offsetof(VexGuestARM64State, guest_Q0) == 16 + 8*38 + 16*0);
+ assert(offsetof(VexGuestARM64State, guest_DCZID_EL0) == 16 + 8*38);
+ assert(offsetof(VexGuestARM64State, guest_Q0) == 16 + 8*39 + 16*0);
HWord arg0 = (HWord)&gst;
HWord arg1 = LibVEX_GuestARM64_get_nzcv(&gst);
Index: pub/libvex_guest_arm64.h
===================================================================
--- pub/libvex_guest_arm64.h (revision 2814)
+++ pub/libvex_guest_arm64.h (working copy)
@@ -89,6 +89,10 @@
/* User-space thread register? */
ULong guest_TPIDR_EL0;
+ /* Cache block size written with byte values of 0 by the DC
+ ZVA, Data Cache Zero by Address, system instruction */
+ ULong guest_DCZID_EL0;
+
/* FP/SIMD state */
U128 guest_Q0;
U128 guest_Q1; |
|
From: Julian S. <js...@ac...> - 2014-02-21 09:48:58
|
> I used the attached patch to address the issued with the DCZID_EL0
> register, since we want this to be supported.
I am a bit surprised that this patch works for you, since
(1) it changes the size of VexGuestARM64State and I would therefore
expect to get an assertion failure indicating that the size is
no longer a multiple of 16, and
(2) IIUC, it allows DCZID_EL0<4> == 0, which means the DC ZVA
instruction is permitted, but VEX does not handle that instruction.
Can you instead try the patch below and see if it helps?
J
Index: priv/guest_arm64_toIR.c
===================================================================
--- priv/guest_arm64_toIR.c (revision 2823)
+++ priv/guest_arm64_toIR.c (working copy)
@@ -4368,6 +4368,18 @@
}
return True;
}
+ /* Cases for DCZID_EL0
+ Don't support arbitrary reads and writes to this register. Just
+ return the value 16, which indicates that the DC ZVA instruction
+ is not permitted, so we don't have to emulate it.
+ D5 3B 00 111 Rt MRS rT, dczid_el0
+ */
+ if ((INSN(31,0) & 0xFFFFFFE0) == 0xD53B00E0) {
+ UInt tt = INSN(4,0);
+ putIReg64orZR(tt, mkU64(1<<4));
+ DIP("mrs %s, dczid_el0 (FAKED)\n", nameIReg64orZR(tt));
+ return True;
+ }
/* FIXME Temporary hacks to get through ld.so FIXME */
/* ------------------ ISB ------------------ */
|
|
From: Anil S. <ani...@li...> - 2014-02-21 13:09:45
|
Hi Julian,
I will try that. There is a "dc zva, x8" instruction as well in the ld*.so
that is causing another unrecognized instruction error.
Does this mean valgrind will not emulate the dc instruction (i.e. all
variants of it) at all?
Thanks,
Anil
On 21 February 2014 15:18, Julian Seward <js...@ac...> wrote:
>
> > I used the attached patch to address the issued with the DCZID_EL0
> > register, since we want this to be supported.
>
> I am a bit surprised that this patch works for you, since
>
> (1) it changes the size of VexGuestARM64State and I would therefore
> expect to get an assertion failure indicating that the size is
> no longer a multiple of 16, and
>
> (2) IIUC, it allows DCZID_EL0<4> == 0, which means the DC ZVA
> instruction is permitted, but VEX does not handle that instruction.
>
> Can you instead try the patch below and see if it helps?
>
> J
>
>
> Index: priv/guest_arm64_toIR.c
> ===================================================================
> --- priv/guest_arm64_toIR.c (revision 2823)
> +++ priv/guest_arm64_toIR.c (working copy)
> @@ -4368,6 +4368,18 @@
> }
> return True;
> }
> + /* Cases for DCZID_EL0
> + Don't support arbitrary reads and writes to this register. Just
> + return the value 16, which indicates that the DC ZVA instruction
> + is not permitted, so we don't have to emulate it.
> + D5 3B 00 111 Rt MRS rT, dczid_el0
> + */
> + if ((INSN(31,0) & 0xFFFFFFE0) == 0xD53B00E0) {
> + UInt tt = INSN(4,0);
> + putIReg64orZR(tt, mkU64(1<<4));
> + DIP("mrs %s, dczid_el0 (FAKED)\n", nameIReg64orZR(tt));
> + return True;
> + }
>
> /* FIXME Temporary hacks to get through ld.so FIXME */
> /* ------------------ ISB ------------------ */
>
>
|
|
From: Julian S. <js...@ac...> - 2014-02-21 16:30:41
|
On 02/21/2014 02:09 PM, Anil Singhar wrote: > Hi Julian, > > I will try that. There is a "dc zva, x8" instruction as well in the ld*.so > that is causing another unrecognized instruction error. > Does this mean valgrind will not emulate the dc instruction (i.e. all > variants of it) at all? If I understand correctly, the patch I made should cause ld.so to not execute "dc zva", so there is no need to implement it right now. J |
|
From: Anil S. <ani...@li...> - 2014-02-25 06:59:22
|
Hi Julian, Thanks for the patch. I could proceed with a basic sanity test on valgrind with the patch. I wanted to do a full fledged regression testing. Is there a test suite available? If yes, could you or someone point me to that..? Thanks, Anil On 21 February 2014 22:00, Julian Seward <js...@ac...> wrote: > On 02/21/2014 02:09 PM, Anil Singhar wrote: > > Hi Julian, > > > > I will try that. There is a "dc zva, x8" instruction as well in the > ld*.so > > that is causing another unrecognized instruction error. > > Does this mean valgrind will not emulate the dc instruction (i.e. all > > variants of it) at all? > > If I understand correctly, the patch I made should cause ld.so to not > execute "dc zva", so there is no need to implement it right now. > > J > > > |
|
From: Mark W. <mj...@re...> - 2014-02-25 09:40:45
|
On Tue, 2014-02-25 at 12:29 +0530, Anil Singhar wrote: > I wanted to do a full fledged regression testing. Is there a test suite > available? If yes, could you or someone point me to that..? make check builds all the tests make regtest runs all regression tests See also README_DEVELOPERS for some more background and how to run individual tests. Cheers, Mark |
|
From: Julian S. <js...@ac...> - 2014-03-10 10:53:17
|
Anil, Try again with the current trunk (valgrind r13860, vex r2837). There have been many improvements and it is now possible to run large apps (eg, Firefox) on Memcheck with very few false positives. This is the first point at which you can reasonably use it for debugging real code. SIMD instruction set support is still incomplete, but is improving. J On 02/25/2014 10:40 AM, Mark Wielaard wrote: > On Tue, 2014-02-25 at 12:29 +0530, Anil Singhar wrote: >> I wanted to do a full fledged regression testing. Is there a test suite >> available? If yes, could you or someone point me to that..? > > make check builds all the tests > make regtest runs all regression tests > > See also README_DEVELOPERS for some more background and how to run > individual tests. > > Cheers, > > Mark > > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: Anil S. <ani...@li...> - 2014-03-12 07:17:02
|
Thanks Julian for the update. I will try it out. -Anil On 10 March 2014 16:23, Julian Seward <js...@ac...> wrote: > > Anil, > > Try again with the current trunk (valgrind r13860, vex r2837). There > have been many improvements and it is now possible to run large apps > (eg, Firefox) on Memcheck with very few false positives. This is > the first point at which you can reasonably use it for debugging real > code. SIMD instruction set support is still incomplete, but is improving. > > J > > > On 02/25/2014 10:40 AM, Mark Wielaard wrote: > > On Tue, 2014-02-25 at 12:29 +0530, Anil Singhar wrote: > >> I wanted to do a full fledged regression testing. Is there a test suite > >> available? If yes, could you or someone point me to that..? > > > > make check builds all the tests > > make regtest runs all regression tests > > > > See also README_DEVELOPERS for some more background and how to run > > individual tests. > > > > Cheers, > > > > Mark > > > > > > > ------------------------------------------------------------------------------ > > Flow-based real-time traffic analytics software. Cisco certified tool. > > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > > Customize your own dashboards, set traffic alerts and generate reports. > > Network behavioral analysis & security monitoring. All-in-one tool. > > > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > > _______________________________________________ > > Valgrind-developers mailing list > > Val...@li... > > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > > > > |