Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ valgrind ./cryptest.exe v
- ==30929== Memcheck, a memory error detector
- ==30929== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
- ==30929== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
- ==30929== Command: ./cryptest.exe v
- ==30929==
- vex x86->IR: unhandled instruction bytes: 0xC4 0xE2 0x7B 0xF7
- ==30929== valgrind: Unrecognised instruction at address 0x811c731.
- ==30929== at 0x811C731: CryptoPP::Rijndael::Base::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&) (rijndael.cpp:209)
- ==30929== by 0x808977D: CryptoPP::ModePolicyCommonTemplate<CryptoPP::AdditiveCipherAbstractPolicy>::CipherSetKey(CryptoPP::NameValuePairs const&, unsigned char const*, unsigned int) (modes.h:98)
- ==30929== by 0x8193DA5: CryptoPP::AdditiveCipherTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::AdditiveCipherAbstractPolicy, CryptoPP::OFB_ModePolicy> >::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&) (strciphr.cpp:15)
- ==30929== by 0x80EFAEF: CryptoPP::SimpleKeyingInterface::SetKeyWithIV(unsigned char const*, unsigned int, unsigned char const*, unsigned int) (cryptlib.cpp:113)
- ==30929== by 0x804B957: SetKeyWithIV (cryptlib.h:573)
- ==30929== by 0x804B957: main (test.cpp:143)
- ==30929== Your program just tried to execute an instruction that Valgrind
- ==30929== did not recognise. There are two possible reasons for this.
- ==30929== 1. Your program has a bug and erroneously jumped to a non-code
- ==30929== location. If you are running Memcheck and you just saw a
- ==30929== warning about a bad jump, it's probably your program's fault.
- ==30929== 2. The instruction is legitimate but Valgrind doesn't handle it,
- ==30929== i.e. it's Valgrind's fault. If you think this is the case or
- ==30929== you are not sure, please let us know and we'll try to fix it.
- ==30929== Either way, Valgrind will now raise a SIGILL signal which will
- ==30929== probably kill your program.
- ==30929==
- ==30929== Process terminating with default action of signal 4 (SIGILL)
- ==30929== Illegal opcode at address 0x811C731
- ==30929== at 0x811C731: CryptoPP::Rijndael::Base::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&) (rijndael.cpp:209)
- ==30929== by 0x808977D: CryptoPP::ModePolicyCommonTemplate<CryptoPP::AdditiveCipherAbstractPolicy>::CipherSetKey(CryptoPP::NameValuePairs const&, unsigned char const*, unsigned int) (modes.h:98)
- ==30929== by 0x8193DA5: CryptoPP::AdditiveCipherTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::AdditiveCipherAbstractPolicy, CryptoPP::OFB_ModePolicy> >::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&) (strciphr.cpp:15)
- ==30929== by 0x80EFAEF: CryptoPP::SimpleKeyingInterface::SetKeyWithIV(unsigned char const*, unsigned int, unsigned char const*, unsigned int) (cryptlib.cpp:113)
- ==30929== by 0x804B957: SetKeyWithIV (cryptlib.h:573)
- ==30929== by 0x804B957: main (test.cpp:143)
- ==30929==
- ==30929== HEAP SUMMARY:
- ==30929== in use at exit: 8,907 bytes in 466 blocks
- ==30929== total heap usage: 655 allocs, 189 frees, 12,746 bytes allocated
- ==30929==
- ==30929== LEAK SUMMARY:
- ==30929== definitely lost: 0 bytes in 0 blocks
- ==30929== indirectly lost: 0 bytes in 0 blocks
- ==30929== possibly lost: 0 bytes in 0 blocks
- ==30929== still reachable: 8,907 bytes in 466 blocks
- ==30929== of which reachable via heuristic:
- ==30929== stdstring : 4,071 bytes in 158 blocks
- ==30929== suppressed: 0 bytes in 0 blocks
- ==30929== Rerun with --leak-check=full to see details of leaked memory
- ==30929==
- ==30929== For counts of detected and suppressed errors, rerun with: -v
- ==30929== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
- Illegal instruction
- $ gdb ./cryptest.exe
- GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
- Copyright (C) 2014 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "i586-linux-gnu".
- Type "show configuration" for configuration details.
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>.
- Find the GDB manual and other documentation resources online at:
- <http://www.gnu.org/software/gdb/documentation/>.
- For help, type "help".
- Type "apropos word" to search for commands related to "word"...
- Reading symbols from ./cryptest.exe...done.
- (gdb) disass /r 0x811c731
- Dump of assembler code for function CryptoPP::Rijndael::Base::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&):
- 0x0811c720 <+0>: 55 push %ebp
- 0x0811c721 <+1>: b8 02 00 00 00 mov $0x2,%eax
- 0x0811c726 <+6>: 89 e5 mov %esp,%ebp
- 0x0811c728 <+8>: 57 push %edi
- 0x0811c729 <+9>: 56 push %esi
- 0x0811c72a <+10>: 53 push %ebx
- 0x0811c72b <+11>: 83 ec 4c sub $0x4c,%esp
- 0x0811c72e <+14>: 8b 4d 08 mov 0x8(%ebp),%ecx
- 0x0811c731 <+17>: c4 e2 7b f7 45 10 shrx %eax,0x10(%ebp),%eax
- 0x0811c737 <+23>: 8b 75 08 mov 0x8(%ebp),%esi
- 0x0811c73a <+26>: 8d 50 06 lea 0x6(%eax),%edx
- 0x0811c73d <+29>: 83 c0 07 add $0x7,%eax
- 0x0811c740 <+32>: 8d 59 10 lea 0x10(%ecx),%ebx
- 0x0811c743 <+35>: 8b b9 10 01 00 00 mov 0x110(%ecx),%edi
- 0x0811c749 <+41>: 89 56 08 mov %edx,0x8(%esi)
- 0x0811c74c <+44>: 8b 91 14 01 00 00 mov 0x114(%ecx),%edx
- 0x0811c752 <+50>: 89 d9 mov %ebx,%ecx
- 0x0811c754 <+52>: 8d 34 85 00 00 00 00 lea 0x0(,%eax,4),%esi
- 0x0811c75b <+59>: f7 d9 neg %ecx
- 0x0811c75d <+61>: 83 e1 0f and $0xf,%ecx
- 0x0811c760 <+64>: 89 75 d4 mov %esi,-0x2c(%ebp)
- ---Type <return> to continue, or q <return> to quit---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement