RuntimeTools / SwiftMetrics

Swift Application Metrics instruments the Swift runtime for performance monitoring, providing the monitoring data programatically via an API or visually with an Eclipse Client.
https://developer.ibm.com/swift/monitoring-diagnostics/application-metrics-for-swift/
Other
156 stars 50 forks source link

Size of data should include null terminator #157

Closed djones6 closed 7 years ago

djones6 commented 7 years ago

Resolves #155 (master branch)

Adds 1 to the size field for data which has been converted to a c string (null-terminated).

The size field did not reflect the addition of the extra null terminator byte. This led to a potential problem when this data is then copied and used as the basis of a Swift String, because the null terminator was not included in the copy.

Equivalent fix for Swift 4 is in RuntimeTools/omr-agentcore#60

codecov-io commented 7 years ago

Codecov Report

Merging #157 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #157      +/-   ##
========================================
+ Coverage   39.99%    40%   +<.01%     
========================================
  Files          54     54              
  Lines        4678   4680       +2     
========================================
+ Hits         1871   1872       +1     
- Misses       2807   2808       +1
Flag Coverage Δ
#SwiftBAMDC 0% <ø> (ø) :arrow_up:
#SwiftMetrics 17.36% <ø> (ø) :arrow_up:
#SwiftMetricsBluemix 21.35% <ø> (ø) :arrow_up:
#SwiftMetricsDash 19.31% <ø> (ø) :arrow_up:
#SwiftMetricsKitura 18.84% <ø> (ø) :arrow_up:
#SwiftMetricsPrometheus 17.36% <ø> (ø) :arrow_up:
#agentcore 35.38% <ø> (-0.03%) :arrow_down:
#cpuplugin 37.4% <100%> (-0.01%) :arrow_down:
#envplugin 39.49% <100%> (ø) :arrow_up:
#hcapiplugin 39.92% <100%> (ø) :arrow_up:
#memplugin 41.46% <100%> (ø) :arrow_up:
#mqttplugin 40% <100%> (ø) :arrow_up:
#ostreamplugin 40% <100%> (ø) :arrow_up:
#paho 40% <100%> (ø) :arrow_up:
Impacted Files Coverage Δ
Sources/memplugin/MemoryPlugin.cpp 87.58% <100%> (ø) :arrow_up:
Sources/cpuplugin/cpuplugin.cpp 81.66% <100%> (+0.1%) :arrow_up:
Sources/envplugin/envplugin.cpp 88.06% <100%> (+0.06%) :arrow_up:
Sources/agentcore/ibmras/common/Logger.cpp 58.62% <0%> (-3.45%) :arrow_down:
...urces/agentcore/ibmras/monitoring/agent/Bucket.cpp 45.52% <0%> (+0.4%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ef9f5a1...55ad76a. Read the comment docs.

codecov-io commented 7 years ago

Codecov Report

Merging #157 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #157      +/-   ##
========================================
+ Coverage   39.99%    40%   +<.01%     
========================================
  Files          54     54              
  Lines        4678   4680       +2     
========================================
+ Hits         1871   1872       +1     
- Misses       2807   2808       +1
Flag Coverage Δ
#SwiftBAMDC 0% <ø> (ø) :arrow_up:
#SwiftMetrics 17.36% <ø> (ø) :arrow_up:
#SwiftMetricsBluemix 21.35% <ø> (ø) :arrow_up:
#SwiftMetricsDash 19.31% <ø> (ø) :arrow_up:
#SwiftMetricsKitura 18.84% <ø> (ø) :arrow_up:
#SwiftMetricsPrometheus 17.36% <ø> (ø) :arrow_up:
#agentcore 35.38% <ø> (-0.03%) :arrow_down:
#cpuplugin 37.4% <100%> (-0.01%) :arrow_down:
#envplugin 39.49% <100%> (ø) :arrow_up:
#hcapiplugin 39.92% <100%> (ø) :arrow_up:
#memplugin 41.46% <100%> (ø) :arrow_up:
#mqttplugin 40% <100%> (ø) :arrow_up:
#ostreamplugin 40% <100%> (ø) :arrow_up:
#paho 40% <100%> (ø) :arrow_up:
Impacted Files Coverage Δ
Sources/cpuplugin/cpuplugin.cpp 81.66% <100%> (+0.1%) :arrow_up:
Sources/envplugin/envplugin.cpp 88.06% <100%> (+0.06%) :arrow_up:
Sources/memplugin/MemoryPlugin.cpp 87.58% <100%> (ø) :arrow_up:
Sources/agentcore/ibmras/common/Logger.cpp 58.62% <0%> (-3.45%) :arrow_down:
...urces/agentcore/ibmras/monitoring/agent/Bucket.cpp 45.52% <0%> (+0.4%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ef9f5a1...55ad76a. Read the comment docs.

codecov-io commented 7 years ago

Codecov Report

Merging #157 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #157      +/-   ##
========================================
+ Coverage   39.99%    40%   +<.01%     
========================================
  Files          54     54              
  Lines        4678   4680       +2     
========================================
+ Hits         1871   1872       +1     
- Misses       2807   2808       +1
Flag Coverage Δ
#SwiftBAMDC 0% <ø> (ø) :arrow_up:
#SwiftMetrics 17.36% <ø> (ø) :arrow_up:
#SwiftMetricsBluemix 21.35% <ø> (ø) :arrow_up:
#SwiftMetricsDash 19.31% <ø> (ø) :arrow_up:
#SwiftMetricsKitura 18.84% <ø> (ø) :arrow_up:
#SwiftMetricsPrometheus 17.36% <ø> (ø) :arrow_up:
#agentcore 35.38% <ø> (-0.03%) :arrow_down:
#cpuplugin 37.4% <100%> (-0.01%) :arrow_down:
#envplugin 39.49% <100%> (ø) :arrow_up:
#hcapiplugin 39.92% <100%> (ø) :arrow_up:
#memplugin 41.46% <100%> (ø) :arrow_up:
#mqttplugin 40% <100%> (ø) :arrow_up:
#ostreamplugin 40% <100%> (ø) :arrow_up:
#paho 40% <100%> (ø) :arrow_up:
Impacted Files Coverage Δ
Sources/cpuplugin/cpuplugin.cpp 81.66% <100%> (+0.1%) :arrow_up:
Sources/envplugin/envplugin.cpp 88.06% <100%> (+0.06%) :arrow_up:
Sources/memplugin/MemoryPlugin.cpp 87.58% <100%> (ø) :arrow_up:
Sources/agentcore/ibmras/common/Logger.cpp 58.62% <0%> (-3.45%) :arrow_down:
...urces/agentcore/ibmras/monitoring/agent/Bucket.cpp 45.52% <0%> (+0.4%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ef9f5a1...55ad76a. Read the comment docs.