Advertisement
Guest User

Untitled

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