• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 9498012098

13 Jun 2024 10:27AM UTC coverage: 61.22% (-3.4%) from 64.615%
9498012098

Pull #14325

github

web-flow
Merge e3409d021 into 57ab0fbc9
Pull Request #14325: Set nsec3param: first increase the serial and then rectify

34064 of 88172 branches covered (38.63%)

Branch coverage included in aggregate %.

5 of 7 new or added lines in 1 file covered. (71.43%)

5415 existing lines in 81 files now uncovered.

118803 of 161528 relevant lines covered (73.55%)

4993315.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/ext/probds/murmur3.cc
1
//-----------------------------------------------------------------------------
2
// MurmurHash3 was written by Austin Appleby, and is placed in the public
3
// domain. The author hereby disclaims copyright to this source code.
4

5
// Note - The x86 and x64 versions do _not_ produce the same results, as the
6
// algorithms are optimized for their respective platforms. You can still
7
// compile and run any of them on any platform, but your performance with the
8
// non-native version will be less than optimal.
9

10
#include "murmur3.h"
11
#include <iostream>
12
#include <unistd.h>
13

14
//-----------------------------------------------------------------------------
15
// Finalization mix - force all bits of a hash block to avalanche
16

17
uint32_t fmix32( uint32_t h )
18
{
2,000,026✔
19
  h ^= h >> 16;
2,000,026✔
20
  h *= 0x85ebca6b;
2,000,026✔
21
  h ^= h >> 13;
2,000,026✔
22
  h *= 0xc2b2ae35;
2,000,026✔
23
  h ^= h >> 16;
2,000,026✔
24

25
  return h;
2,000,026✔
26
}
2,000,026✔
27

28
//-----------------------------------------------------------------------------
29

30

31
void MurmurHash3_x86_32( const void * key, int len, uint32_t seed, void * out )
32
{
2,000,026✔
33
  const uint8_t * data = (const uint8_t*)key;
2,000,026✔
34
  const int nblocks = len / 4;
2,000,026✔
35
  int i;
2,000,026✔
36

37
  uint32_t h1 = seed;
2,000,026✔
38

39
  uint32_t c1 = 0xcc9e2d51;
2,000,026✔
40
  uint32_t c2 = 0x1b873593;
2,000,026✔
41

42
  //----------
43
  // body
44

45
  const uint32_t * blocks = (const uint32_t *)(data + nblocks*4);
2,000,026✔
46

47
  for(i = -nblocks; i; i++)
6,000,080✔
48
  {
4,000,054✔
49
    uint32_t k1 = getblock(blocks,i);
4,000,054✔
50

51
    k1 *= c1;
4,000,054✔
52
    k1 = ROTL32(k1,15);
4,000,054✔
53
    k1 *= c2;
4,000,054✔
54

55
    h1 ^= k1;
4,000,054✔
56
    h1 = ROTL32(h1,13);
4,000,054✔
57
    h1 = h1*5+0xe6546b64;
4,000,054✔
58
  }
4,000,054✔
59

60
  //----------
61
  // tail
62
  {
2,000,026✔
63
    const uint8_t * tail = (const uint8_t*)(data + nblocks*4);
2,000,026✔
64
    
65
    uint32_t k1 = 0;
2,000,026✔
66
    
67
    switch(len & 3)
2,000,026!
68
    {
2,000,026✔
UNCOV
69
    case 3: k1 ^= tail[2] << 16;
×
70
      /* fallthrough */
UNCOV
71
    case 2: k1 ^= tail[1] << 8;
×
72
      /* fallthrough */
73
    case 1: k1 ^= tail[0];
2,000,026!
74
            k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
2,000,026✔
75
    };
2,000,026✔
76
  }
2,000,026✔
77

78
  //----------
79
  // finalization
80

81
  h1 ^= len;
2,000,026✔
82

83
  h1 = fmix32(h1);
2,000,026✔
84

85
  *(uint32_t*)out = h1;
2,000,026✔
86
}
2,000,026✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc