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

Tweak malloc_stack on OpenBSD to match other implementations; explain lack of guard page #54564

Merged
merged 2 commits into from
May 24, 2024

Conversation

fingolfin
Copy link
Member

The other malloc_stack implementations were switched to using jl_atomic_fetch_add_relaxed on 2024-02-23. I suspect that this simply overlapped in time with the creation of the OpenBSD patches, which were submitted in March, but presumably work started before that :-).

CC @semarie please check that I am not messing up something for you.

Also, while at it, I noticed that the OpenBSD malloc_stack is missing the mprotect for setting up a guard page, which concerns me a bit. Is there a deeper reason for this omission?

@semarie
Copy link
Contributor

semarie commented May 24, 2024 via email

@fingolfin fingolfin force-pushed the mh/malloc_stack-OpenBSD branch from 09bf25b to f6514a0 Compare May 24, 2024 06:30
@fingolfin
Copy link
Member Author

Thanks for the clarification, much appreciated! I think it is important to document such details (and we should do so in many more places). So I took the liberty and turned your nice explanation into a source comment. Please let me know if this is OK for you.

@fingolfin fingolfin force-pushed the mh/malloc_stack-OpenBSD branch from f6514a0 to 1cfe34e Compare May 24, 2024 06:32
@fingolfin fingolfin changed the title Tweak malloc_stack on OpenBSD to match other unices Tweak malloc_stack on OpenBSD to match other implementations; explain lack of guard page May 24, 2024
The other malloc_stack implementations were switched to using
jl_atomic_fetch_add_relaxed on 2024-02-23. I suspect that this
simply overlapped in time with the creation of the OpenBSD
patches, which were submitted in March, but presumably work
started before that :-).
@fingolfin fingolfin force-pushed the mh/malloc_stack-OpenBSD branch 2 times, most recently from 555ed34 to 9c2e343 Compare May 24, 2024 06:34
@fingolfin fingolfin force-pushed the mh/malloc_stack-OpenBSD branch from 9c2e343 to f70f722 Compare May 24, 2024 07:42
@semarie
Copy link
Contributor

semarie commented May 24, 2024

LGTM thanks.

@fingolfin fingolfin merged commit 1488da8 into JuliaLang:master May 24, 2024
7 checks passed
@fingolfin fingolfin deleted the mh/malloc_stack-OpenBSD branch May 24, 2024 16:50
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
… lack of guard page (JuliaLang#54564)

The other malloc_stack implementations were switched to using
jl_atomic_fetch_add_relaxed on 2024-02-23. I suspect that this simply
overlapped in time with the creation of the OpenBSD patches, which were
submitted in March, but presumably work started before that :-).

CC @semarie please check that I am not messing up something for you.

Also, while at it, I noticed that the OpenBSD `malloc_stack` is missing
the `mprotect` for setting up a guard page, which concerns me a bit. Is
there a deeper reason for this omission?
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.

2 participants