[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Building torch7
- From: Paige DePol <lual@...>
- Date: Wed, 31 Jan 2018 16:45:51 -0600
Dibyendu Majumdar <firstname.lastname@example.org> wrote:
> On 31 January 2018 at 21:09, Dibyendu Majumdar <email@example.com> wrote:
>> Second issue I am still investigating. While initializing torch I get
>> an error that I was surprised to see - it is do with exceeding the
>> number of max upvalues; this is set to 120 in Ravi. I have to work out
>> whether this is what it appears or something else.
> Okay I found the issue here - in debug builds of Ravi I have 'ltests'
> turned ON. Unfortunately this messes with some Lua settings. When apps
> are linked against Ravi they don't see the messed up settings .. and
> bang! the LUA_REGISTRYINDEX is not where the app thinks it is.
> I guess I have have to make 'ltests' an explicit feature and not part
> of all debug builds.
> If you don't know what 'ltests' is then it is part of Lua's internal
> testing infrastructure. When it is enabled it does a bunch of internal
> checks and also exposes a library that can be used in tests cases. It
> also amends some Lua settings making them more aggressive - hence the
> problem above.
LUA_REGISTRYINDEX is set relative to LUAI_MAXSTACK, normally the max
stack define is set to 15k for 32-bit or 1kk otherwise. Under 'ltests'
it is defined as 50k. Perhaps just changing this value to the default
value would allow you to keep 'ltests' enabled when linking?