Page MenuHomePhabricator

HHVM has trouble with mw.clone()
Closed, DeclinedPublic

Description

Author: ignatus31oct

Description:
Under HHVM some problem appears with frame, wich results in defunction which is not attested without HHVM. A way of temporarily avoiding it can be seen in this edit:
https://ru.wikipedia.org/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Transclude&curid=4437762&diff=66100041&oldid=63543436
Original bugreport in ruwiki is:
https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%A4%D0%BE%D1%80%D1%83%D0%BC/%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9#HHVM


Version: unspecified
Severity: normal

Details

Reference
bz71981

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:49 AM
bzimport added a project: Scribunto.
bzimport set Reference to bz71981.
bzimport added a subscriber: Unknown Object (MLST).

It's problem with frame:expandTemplate(), not with mw.clone().
If we use mw.clone(f.args), it's copy metatable too. And for table with metatable frame:expandTemplate() returns empty string when HHVM enabled.

Simplified code:

local M={}
function M.foo(f)

a = mw.clone(f.args)
out = f:expandTemplate{ title='Bar', args=a }
return out

return M

I can't tell what the problem is. What are the expected and actual behaviors of that snippet, what does Template:Bar need to contain in that example, and what arguments need to be passed to Lua?

Same here, can't reproduce with the information given.

Unfortunately closing this report as no further information has been provided.

Alexandr: Please feel free to reopen this report if you can provide the information asked for in comment 2 and comment 3 and if this still happens. Thanks!