Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] Fix possibly race on undefined behavior #12408

Merged
merged 1 commit into from
Jul 17, 2018

Conversation

tmpsantos
Copy link
Contributor

runnable->iter = runnables.end() assumes that ::end() is a static or constxpr and thread-safe. This is likely to be true for most of the implementations. That said we cannot rely on undefined behavior and we should assume the worse case scenario.

`runnable->iter = runnables.end()` assumes that `::end()` is a
`static` or `constxpr` and thread-safe. This is likely to be true
for most of the implementations. That said we cannot rely on
undefined behavior and we should assume the worse case scenario.
@tmpsantos tmpsantos added bug Android Mapbox Maps SDK for Android labels Jul 17, 2018
@tmpsantos tmpsantos self-assigned this Jul 17, 2018
Copy link
Contributor

@kkaefer kkaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkaefer kkaefer merged commit bffc60f into master Jul 17, 2018
@kkaefer kkaefer deleted the tmpsantos-android_race branch July 17, 2018 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants