classification
Title: Argument Clinic accepts no-default args after default args
Type: crash Stage: resolved
Components: Build Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: 20390 Superseder:
Assigned To: larry Nosy List: larry, rmsr, yselivanov
Priority: normal Keywords:

Created on 2014-01-13 02:31 by rmsr, last changed 2014-01-31 11:07 by larry. This issue is now closed.

Messages (5)
msg207997 - (view) Author: Ryan Smith-Roberts (rmsr) * Date: 2014-01-13 02:31
A signature of the form

a: object = None
b: object

results in b being uninitialized in the generated C code prior to the PyArgs_ParseTuple call. If ParseTuple does not set a value for b (as it is an optional argument), b then contains a garbage pointer and the interpreter may segfault.

AC should reject this configuration.
msg208185 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-15 20:06
I'll fix this, but it's lower priority than the new features for Clinic that people need in order to get unblocked.
msg209208 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-25 15:31
The bug you cited is fixed in today's rollup patch, #20390.  (I don't know how to denote the dependency between the two issues, maybe someone else can do that for me?)
msg209677 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-01-29 20:48
Should this one be closed now?

FWIW, signature object validates this case now.
msg209765 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-01-31 11:07
Yup!
History
Date User Action Args
2014-01-31 11:07:09larrysetstatus: open -> closed
messages: + msg209765

assignee: larry
resolution: fixed
stage: resolved
2014-01-29 20:48:17yselivanovsetnosy: + yselivanov
dependencies: + Argument Clinic rollup patch, 2014/01/25
messages: + msg209677
2014-01-25 15:31:26larrysetmessages: + msg209208
2014-01-15 20:06:01larrysetmessages: + msg208185
2014-01-13 02:32:32rmsrsettype: crash
2014-01-13 02:31:55rmsrcreate