Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes initializing random on windows #202

Merged
merged 2 commits into from
Mar 30, 2020
Merged

Fixes initializing random on windows #202

merged 2 commits into from
Mar 30, 2020

Conversation

cammm
Copy link
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
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
Member

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