Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
9e7817ed
Commit
9e7817ed
authored
May 02, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1151 from Daetalus/ref_nexedi_str
Fix the test_string segfault error
parents
b74be94e
e1f9db5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
6 deletions
+5
-6
from_cpython/Lib/test/test_posix.py
from_cpython/Lib/test/test_posix.py
+0
-2
from_cpython/Lib/test/test_string.py
from_cpython/Lib/test/test_string.py
+0
-2
from_cpython/Modules/posixmodule.c
from_cpython/Modules/posixmodule.c
+4
-1
src/runtime/descr.cpp
src/runtime/descr.cpp
+1
-1
No files found.
from_cpython/Lib/test/test_posix.py
View file @
9e7817ed
# expected: reffail
# - leaked refs
"Test posix functions"
from
test
import
test_support
...
...
from_cpython/Lib/test/test_string.py
View file @
9e7817ed
# expected: reffail
# - unknown segfault
import
unittest
,
string
from
test
import
test_support
,
string_tests
from
UserList
import
UserList
...
...
from_cpython/Modules/posixmodule.c
View file @
9e7817ed
...
...
@@ -6911,8 +6911,11 @@ posix_fdopen(PyObject *self, PyObject *args)
#endif
Py_END_ALLOW_THREADS
PyMem_FREE
(
mode
);
if
(
fp
==
NULL
)
// Pyston change: decref the file object when throw exception
if
(
fp
==
NULL
)
{
Py_DECREF
(
f
);
return
posix_error
();
}
/* We now know we will succeed, so initialize the file object. */
((
PyFileObject
*
)
f
)
->
f_fp
=
fp
;
PyFile_SetBufSize
(
f
,
bufsize
);
...
...
src/runtime/descr.cpp
View file @
9e7817ed
...
...
@@ -313,7 +313,7 @@ Box* BoxedMethodDescriptor::tppCall(Box* _self, CallRewriteArgs* rewrite_args, A
Box
**
oargs
=
NULL
;
Box
*
oargs_array
[
1
];
Box
*
oargs_array
[
1
]
=
{
NULL
}
;
if
(
paramspec
.
totalReceived
()
>
3
)
{
assert
((
paramspec
.
totalReceived
()
-
3
)
<=
sizeof
(
oargs_array
)
/
sizeof
(
oargs_array
[
0
]));
oargs
=
oargs_array
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment