These are chat archives for dropbox/pyston

10th
May 2016
Marius Wachtler
@undingen
May 10 2016 00:12
don't we own all arguments automatically. at least the interpreter will incref it when assigning it to the arg sym.
from ASTInterpreter::initArguments:
for (auto& name : param_names.arg_names) {
        doStore(name, Value(incref(getArg(i++, arg1, arg2, arg3, args)), 0));
    }
but maybe I have thinko because I'm tired. see you tomorrow :-)
Kevin Modzelewski
@kmod
May 10 2016 00:13
yes for normal arguments we do
but for defaults we don't :/
Kevin Modzelewski
@kmod
May 10 2016 05:38
Hey marius are you looking into the other integration tests?
I'm trying to pick what to do next
Marius Wachtler
@undingen
May 10 2016 09:56
yes I will look into them today
Marius Wachtler
@undingen
May 10 2016 16:08
@kmod when running the cheetah integration test I'm running into this assert:
virtual ConcreteCompilerVariable *pyston::UndefType::makeConverted(pyston::IREmitter &, VAR *, ConcreteCompilerType *): Assertion `other_type == UNKNOWN' failed.
it's while Converting #117 from undefType to NormalType(str) inside site-packages/Cheetah/Compiler.py:1500 ModuleCompiler::__init__
Block 41 'iffalse'; Predecessors: 39 Successors: 43 47
    #110 = unicodeDirectiveRE
    #111 = source
    #112 = #110.sub("", #111)
    source = #112
    #113 = isinstance
    #114 = source
    #115 = str
    #116 = #113(#114, #115)
    if :NONZERO(#116) goto 43 else goto 47
Block 43 'iftrue'; Predecessors: 41 Successors: 44 45
    #118 = unicodeMatch
    #119 = #118.group(1)
    #117 = #119
    if :NONZERO(#119) goto 45 else goto 44
Block 44; Predecessors: 43 Successors: 46
    #117 = "ascii"
    goto 46
Block 45; Predecessors: 43 Successors: 46
    goto 46
Block 46; Predecessors: 45 44 Successors: 48
    encoding = #117
    #120 = unicode
    #121 = source
    #122 = encoding
    #123 = #120(#121, #122)
    source = #123
    goto 48
can you please take a look at it if when you have time. I can't figure out why it thinks it's undefined...
we trigger the assert while processing the jump to BB 46 in BB 45.
Marius Wachtler
@undingen
May 10 2016 16:48
oh and you can reproduce it with upstream/refcounting but you have to disable the RELEASE_ASSERT(_Py_RefTotal == 0 assert and than run ./pyston_dbg test/extra/cheetah_test.py
Sun
@Daetalus
May 10 2016 16:49
I encountered it in NumPy to. And mentioned it to kmod, but didn't provide a snippet yet.
Marius Wachtler
@undingen
May 10 2016 16:50
oh, interesting :-)
so not sure which one is easier to reproduce
Sun
@Daetalus
May 10 2016 16:51
Yeah... Because I don't know how to let him reproduce it...
Marius Wachtler
@undingen
May 10 2016 21:17
concerning the _Py_RefTotal == 0 check. Do we want to disable the check whenever a c extension gets loaded or only for c extensions which are outside of from_cpython/Lib/?
Kevin Modzelewski
@kmod
May 10 2016 22:09
I'd say we should try to keep the check aggressive if possible :) so I'd vote for only if we load one from outside from_cpython
eventually I think we'll turn the check off entirely, but for now it seems to still be finding things for us
also, I'll look into that undef issue
Nathaniel J. Smith
@njsmith
May 10 2016 22:36
If you can't make ndarray.resize's tricky refcnt checking logic work, then I guess that would be some leverage to try and deprecate it... that thing is nasty :-)
(and there might well be some other numpy tests that are just buggy because they make invalid assumptions about refcnting, e.g. tests that are trying to make sure that references don't leak.)