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

few corrections for guess_os_stack_limit() on OpenBSD #34

Closed
wants to merge 2 commits into from
Closed

few corrections for guess_os_stack_limit() on OpenBSD #34

wants to merge 2 commits into from

Conversation

semarie
Copy link
Contributor

@semarie semarie commented May 9, 2020

  • assert_eq!() syntax
  • ss_sp is pointer (not usize)
  • ss_sp is top (well, for all archs except hppa on OpenBSD, but hppa isn't supported by rust for now)

- assert_eq!() syntax
- `ss_sp` is pointer (not usize)
- `ss_sp` is top (well, for all archs except hppa on OpenBSD, but hppa isn't supported by rust for now)
@semarie
Copy link
Contributor Author

semarie commented May 9, 2020

technically, it isn't enough to make stacker to work on OpenBSD.

in particular, _grow() needs to allocate a memory segment using libc::MAP_STACK flag (and PROT_READ | PROT_WRITE). guard pages isn't strictly necessary too on OpenBSD, as kernel already take care of that.

use mmap(2) instead of mprotect(2) to pass MAP_STACK
@semarie
Copy link
Contributor Author

semarie commented May 9, 2020

now, it is enough for openbsd (with #33)

@nagisa
Copy link
Member

nagisa commented May 9, 2020

in particular, _grow() needs to allocate a memory segment using libc::MAP_STACK flag

Is this a strict requirement on OpenBSD? Do you know why? Some other platforms also have a MAP_STACK flag, but it is not required for things to work.

EDIT: Ah, I see the comment on the issue.

@nagisa
Copy link
Member

nagisa commented May 9, 2020

(Merged as 93325b4)

@nagisa nagisa closed this May 9, 2020
@semarie semarie deleted the openbsd-guess_os_stack_limit branch May 9, 2020 12:49
bors added a commit to rust-lang-ci/rust that referenced this pull request May 16, 2020
…acrum

update stacker to 0.1.9 to unbreak build on OpenBSD

the version 0.1.8 of stacker (what is currently pinned in Cargo.lock) doesn't build on OpenBSD (see rust-lang/stacker#34).

update the version to 0.1.9
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