Conversation
36f706e to
cfd5285
Compare
9c404c1 to
7d71c77
Compare
db1e745 to
1cab00a
Compare
8e5fdc6 to
e73e331
Compare
4929fe3 to
6ed03fb
Compare
Osyotr
commented
Mar 4, 2026
| }; | ||
|
|
||
| #if defined(OMIM_OS_WINDOWS) //&& defined(PROFILER_COMMON) | ||
| #if 0 && defined(OMIM_OS_WINDOWS) //&& defined(PROFILER_COMMON) |
Owner
Author
There was a problem hiding this comment.
The std::streambuf contract requires returning traits_type::not_eof(c) on success. Signed-off-by: Alexander Borsuk <me@alex.bio>
When a resume file has a matching header but zero chunk records, count is 0. The code then dereferences &m_chunks[0] on an empty vector and iterates to count-1 which underflows size_t. Signed-off-by: Alexander Borsuk <me@alex.bio>
When the on-disk version didn't match kCurrentVersion, the constructor closed m_stream but never recreated the file. After a successful close(), !m_stream evaluates the fail bit (not is_open), so the fallback createNewFile() was never reached. The object survived construction with a closed stream, hitting assertions in Append/ForEach. Recreate the file when an unsupported version is encountered, and add a test for the unsupported version scenario. Signed-off-by: Alexander Borsuk <me@alex.bio>
After Clear(), the filter's m_lastInfo/m_lastAcceptedInfo state persisted from the previous recording session. This caused the next segment's early points to be dropped as "too close" or "bad acceleration" relative to pre-clear history, and Finalize() could re-emit a stale last point. Add IGpsTrackFilter::Reset() and call it when needClear is set, so the filter starts fresh for the new track segment. Signed-off-by: Alexander Borsuk <me@alex.bio>
Serialize() refuses odd transitions_length (would imply unmatched DST state), but Deserialize() accepted it. A malformed tzdb blob could load a logically impossible zone and produce wrong time conversions. Add the same even-check to Deserialize() and add tests for both Serialize and Deserialize rejection of odd transitions. Signed-off-by: Alexander Borsuk <me@alex.bio>
GetWriter() had two problems during consecutive rewrites in a single writer session: 1. The m_needRewrite branch added a new section entry with m_size=0 and returned the writer without stabilizing the previous section's metadata. A second GetWriter call operated on stale m_info. 2. Non-last sections were handled via DeleteSection, which opens the file as FilesContainerR — but during a write session the on-disk service info is stale (truncated away), causing read failures. Fix by: - Calling SaveCurrentSize() at the top of GetWriter when !m_needRewrite to stabilize the last entry's size from the actual file size. - Replacing DeleteSection with a simple m_info.erase() for section removal. The old section data stays as a harmless gap; Finish() writes correct service info referencing only live sections. Enable the previously-disabled FilesContainer_ConsecutiveRewriteExisting test that exercises this exact scenario. Signed-off-by: Alexander Borsuk <me@alex.bio>
erase() used an O(n) Swap-based shift for both static and dynamic modes. In dynamic mode, this is slower than m_dynamic.erase() which uses optimized memmove for trivial types and proper move semantics. This matters for production code using buffer_vector with non-trivial types (unique_ptr, shared_ptr, string). Delegate to m_dynamic.erase() when in dynamic mode. Add comprehensive unit tests covering previously-untested paths. Signed-off-by: Alexander Borsuk <me@alex.bio>
Signed-off-by: Osyotr <Osyotr@users.noreply.github.com> Don't set LANGUAGE environment variable on Windows Signed-off-by: Osyotr <Osyotr@users.noreply.github.com> Skip (MALI_)MobileCompileShaders_TEST on Windows Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
Use /fp:fast to match other platforms behavior. Set /bigobj to prevent possible linking errors with static libraries. Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
There's no need to support Windows XP :) Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.