Skip to content

Conversation

@Elias481
Copy link

@Elias481 Elias481 commented Sep 24, 2018

Posible fix for SIGSEGV on script specified on command line not found in 3.7 (for example on Alpine).
On other Linux there is a (null) output instead.

This would fix issue reported here: docker-library/python#320 .

pymain_clear_config must not be run before pymain_run_filename -> pymain_open_filename.

Could be implemented other way, thought. @vstinner should now how to do it properly.

Alternative approaches I could mind, for example:

  • preserver value of pymain->config.program and pass it through to pymain_open_filename in case it needs it for reporting errors
  • get the program name for error message another way
  • do not reference pymain->config.program in pymain_open_filename when the error message is generated
  • ensure that all systems print "(null)" as program name instead to SEGV
  • do not clear this at all

https://bugs.python.org/issue34783

@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 our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

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

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

@vstinner
Copy link
Member

I wrote a different fix: PR 9526. See the bug for the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants