Skip to content

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

Merged
vstinner merged 7 commits into
python:masterfrom
costypetrisor:fix-issue-34113
Jul 31, 2018
Merged

bpo-34113: Fix SIGSEGV on negative STACKADJ when LLTRACE is on#8517
vstinner merged 7 commits into
python:masterfrom
costypetrisor:fix-issue-34113

Conversation

@costypetrisor

@costypetrisor costypetrisor commented Jul 28, 2018

Copy link
Copy Markdown
Contributor

@the-knights-who-say-ni

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

cc @vstinner

@encukou

encukou commented Jul 28, 2018

Copy link
Copy Markdown
Member

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

@costypetrisor

Copy link
Copy Markdown
Contributor Author

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

Comment thread Lib/test/test_lltrace.py Outdated

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done :)

Comment thread Lib/test/test_lltrace.py Outdated
Comment thread Lib/test/test_lltrace.py Outdated

Copy link
Copy Markdown
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.

Comment thread Lib/test/test_lltrace.py Outdated
Comment thread Lib/test/test_lltrace.py Outdated
Comment thread Lib/test/test_lltrace.py Outdated
Comment thread Python/ceval.c Outdated
@bedevere-bot

Copy link
Copy Markdown

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.

Comment thread Python/ceval.c Outdated
@costypetrisor

Copy link
Copy Markdown
Contributor Author

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

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

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

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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