Skip to content

Fixes initializing random on windows#202

Merged
Swatinem merged 2 commits intogetsentry:masterfrom
cammm:fix-win-random
Mar 30, 2020
Merged

Fixes initializing random on windows#202
Swatinem merged 2 commits intogetsentry:masterfrom
cammm:fix-win-random

Conversation

@cammm
Copy link
Copy Markdown
Contributor

@cammm cammm commented Mar 27, 2020

The SENTRY_CTOR isn't working for me and afaik it is not safe to call LoadLibraryA outside of main() ie during static initialization or DLLMain. Switching this to initialize on the first call to random instead.

The SENTRY_CTOR isn't working for me and afaik it is not safe to call LoadLibraryA outside of main() ie during static initialization or DLLMain. Switching this to initialize on the first call to random instead.
@Swatinem Swatinem merged commit 97714fb into getsentry:master Mar 30, 2020
@jan-auer
Copy link
Copy Markdown
Member

@Swatinem what do you think about creating a random number in sentry_init just to eager-initialize and avoid overheads when the first event is created?

@Swatinem
Copy link
Copy Markdown
Contributor

We basically do that already, when creating a random uuid for the run folder.

@cammm cammm deleted the fix-win-random branch March 30, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants