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 definition of probestack functions #176

Merged
merged 2 commits into from
Jul 8, 2017

Conversation

alexcrichton
Copy link
Member

It looks like the old __rust_probestack routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why that's happening is that the faulting address
is below %rsp, whereas previously all faulting stack addresses were above
%rsp. The probestack routine does not modify %rsp as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update %rsp incrementally
as probing happens. The ABI of the function, however, requires that %rsp
isn't changed as part of the function so it's restored at the end to the
previous value.

It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 7, 2017

📌 Commit f9f6bd0 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jul 7, 2017

⌛ Testing commit f9f6bd0 with merge ae2116b...

bors added a commit that referenced this pull request Jul 7, 2017
Tweak definition of probestack functions

It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
@bors
Copy link
Contributor

bors commented Jul 7, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 7, 2017

📌 Commit 2061072 has been approved by alexcrichton

bors added a commit that referenced this pull request Jul 7, 2017
Tweak definition of probestack functions

It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
@bors
Copy link
Contributor

bors commented Jul 7, 2017

⌛ Testing commit 2061072 with merge e30704c...

@bors
Copy link
Contributor

bors commented Jul 7, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 7, 2017

📌 Commit 2bec5cf has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jul 7, 2017

⌛ Testing commit 2bec5cf with merge 7f726af...

bors added a commit that referenced this pull request Jul 7, 2017
Tweak definition of probestack functions

It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
@bors
Copy link
Contributor

bors commented Jul 7, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 7, 2017

📌 Commit 787c58f has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jul 7, 2017

⌛ Testing commit 787c58f with merge d98b721...

bors added a commit that referenced this pull request Jul 7, 2017
Tweak definition of probestack functions

It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
@bors
Copy link
Contributor

bors commented Jul 8, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 8, 2017

📌 Commit 91eaa85 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jul 8, 2017

⌛ Testing commit 91eaa85 with merge 5e49856...

bors added a commit that referenced this pull request Jul 8, 2017
Tweak definition of probestack functions

It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.

This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
@bors
Copy link
Contributor

bors commented Jul 8, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 5e49856 to master...

@bors bors merged commit 91eaa85 into rust-lang:master Jul 8, 2017
@alexcrichton alexcrichton deleted the probestack2 branch July 12, 2017 17:22
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