[
https://issues.apache.org/jira/browse/GEODE-7447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975296#comment-16975296
]
ASF subversion and git services commented on GEODE-7447:
--------------------------------------------------------
Commit a88247f0fa6d1e7a4bbdd663b1c286be59aacc2b in geode-native's branch
refs/heads/develop from Blake Bender
[ https://gitbox.apache.org/repos/asf?p=geode-native.git;h=a88247f ]
GEODE-7447: Fix logging format spec <--> variable size mismatches (#548)
* GEODE-7447: Fix logging format spec <--> variable size mismatches
- std::chrono 'Rep' type changes size based on platform
- when size mismatched to format spec in log call, bad things happen
- also fix up any other discrepancies found between sizeof(type) and %z
format specifier
- Switch calls to our to_string implementation for durations
> Fix remaining log message formatting errors with std::chrono 'Rep' type
> -----------------------------------------------------------------------
>
> Key: GEODE-7447
> URL: https://issues.apache.org/jira/browse/GEODE-7447
> Project: Geode
> Issue Type: Bug
> Components: native client
> Reporter: Blake Bender
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> As a developer (or customer), I would very much like to be able to collect
> debug-level logs from the native client, when necessary, without fear of
> either:
> * hitting a segfault in the logging code, or
> * emitting invalid UTF-8 text due to a mismatched variable size & format
> specifier
>
> GEODE-7426 fixed a specific instance of this bug, but there are a number of
> these remaining in the codebase, any of which could bite us at any time. The
> std::chrono 'Rep' type is numeric, but its size can vary depending on
> platform, and combined with the %z format specifier in a log message, will
> produce a segfault when Rep is a different size than expected.
> A survey of the source tree at the current `develop` branch SHA (
> 1bb8cf4b296bc09b3fb4ae098be6fb73ff90c61d)
> shows 17 instances of the problem, at the following locations:
> EntryExpiryHandler.cpp: 59
> LocalRegion.cpp: 699, 720, 2799, 2804
> Log.cpp: 527 (maybe? Not sure on this one)
> RegionExpiryHandler.cpp: 58, 69
> TcpConn.cpp: 212
> TcpSslConn.cpp: 94
> TcrConnection.cpp: 619, 647
> TcrEndpoint.cpp: 187, 924, 1053
> ThinClientRegion.cpp: 3019, 3028
>
> When fixing these, refer to the original fix for GEODE-7426.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)