SHARE
TWEET

Untitled

a guest Jun 25th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uint64_t *overflow;
  2. ...
  3. int temp[64];
  4. // I expect count2 to become larger than 60
  5. int count2 = 0;
  6. for(int j = 63; j >= 0; j--) {
  7.     int cj = (int) ((overflow[index + j / 8] >> (8 * j)) & 0xff);
  8.     temp[j] = cj;
  9.     count2 += cj;
  10. }
  11. if (count2 < 60) {
  12.     // that's weird, smaller than 60... try again
  13.     // using the same code, except for the debug output (cout)
  14.     count2 = 0;
  15.     for(int j = 63; j >= 0; j--) {
  16.         int cj = (int) ((overflow[index + j / 8] >> (8 * j)) & 0xff);
  17.         temp[j] = cj;
  18.         ::std::cout << " temp " << temp[j] << "n";
  19.         count2 += cj;
  20.     }
  21.     // according to my logic, count2 is smaller than 60 now
  22.     ::std::cout << "count2 " << count2 << " count3 " << count3 << "n";
  23. }
  24.      
  25. temp[63] = 2
  26. temp[62] = 4
  27. temp[61] = 2
  28. temp[60] = 2
  29. ...
  30. count2 2 count3 62
  31.      
  32. > g++ --version
  33. Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  34. Target: x86_64-apple-darwin18.6.0
  35. Thread model: posix
  36.      
  37. OPT = -O3 -DNDEBUG
  38. CXXFLAGS += -fno-strict-aliasing -Wall -std=c++11 $(OPT)
  39. LDFLAGS = -Wall
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top