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

bpo-34113: Fix SIGSEGV on negative STACKADJ when LLTRACE is on #8517

Merged
merged 7 commits into from
Jul 31, 2018

Conversation

costypetrisor
Copy link
Contributor

@costypetrisor costypetrisor commented Jul 28, 2018

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

When your account is ready, please add a comment in this pull request
and a Python core developer will remove the CLA not signed label
to make the bot check again.

You can check yourself
to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@costypetrisor
Copy link
Contributor Author

cc @vstinner

@encukou
Copy link
Member

encukou commented Jul 28, 2018

Can you also add a test that fails without this change?

@costypetrisor
Copy link
Contributor Author

@encukou I pushed a new test which without the fix would crash

@@ -0,0 +1,43 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this empty line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

tmp_script.flush()

status, stdout, stderr = assert_python_ok(tmp_script.name)
self.assertEqual(status, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function already checks status. in fact, you don't need the function result: "status, stdout, stderr = " can be removed IMHO.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@costypetrisor
Copy link
Contributor Author

I have made the requested changes; please review again
:)

@bedevere-bot
Copy link

Thanks for making the requested changes!

@vstinner: please review the changes made to this pull request.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum. I'm confused. Why do you write "LLTRACE" with 2 L whereas the constant only contains 1 L? If it's a typo, would you mind to rename the test file, test case and test method?

@vstinner
Copy link
Member

Oh, LLTRACE comes from a C define:

#define LLTRACE  1      /* Low-level trace feature */

LL as Low-Level, I see. It's just surprising that the constant is called ltrace with a single L :-)

@costypetrisor
Copy link
Contributor Author

@vstinner I was confused about this during the sprint too. Petr Viktorin who was sitting next to me didn't knew why this was written like this either.

So from what I understand the gist is that LLTRACE is the feature coming from Low Level Trace, but the global that you set in the console interpretor is __ltrace__ with just 1 lower-case L.

@vstinner vstinner merged commit 8ed317f into python:master Jul 31, 2018
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.

6 participants