delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/06/30/10:37:03

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=shSvWsIBcAhFM1h+01YHiON+IqgGouHmxDN7woLifM6
JRnP1RoawsT8N2N7DTSEyj2JPmaULqjcnKXDiHpleYJZxkU+tJjjD7j/08eWIKlJ
0Ny9xKnKFD7SdjDnedw/NYjHURpRQOgAWelbUnh7gL8d7oYFQ6Ta0IgRWTKhp8iI
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=b9vnbeipceAf+QXTMluZEZbpRX4=; b=Kwokcc6yPkit2+wqP
QcW18uVJxvTtEkXpSYkjMDxEWV1n13WAYkHfvbzYRuCl/Bttm7akSuGsRKgW5sf+
rVaZzL++ud7UwtB1KYIN38yAFiSOTOQPZfMbId3zGZAbUuCDBFjbr+IPOP4s9Yhi
SygrRI59krBrLvrkx9GIHWxBlk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS,TW_NV,TW_VK,TW_VP autolearn=ham version=3.3.1
X-CornellRouted: This message has been Routed already.
Message-ID: <51D04278.5010907@cornell.edu>
Date: Sun, 30 Jun 2013 10:36:40 -0400
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: texlive-install: core dumped
References: <op DOT wzfrolroofd6j1 AT nebbiolo DOT upc DOT de> <51CEC839 DOT 507 AT cornell DOT edu> <op DOT wzfwtr0wofd6j1 AT nebbiolo DOT upc DOT de> <51CEE558 DOT 6070104 AT cornell DOT edu> <op DOT wzgaely4ofd6j1 AT nebbiolo DOT upc DOT de> <51CF2925 DOT 2060804 AT cornell DOT edu> <op DOT wzggt0qzofd6j1 AT nebbiolo DOT upc DOT de> <51CF63C4 DOT 4070001 AT cornell DOT edu> <op DOT wzgxhts2ofd6j1 AT nebbiolo DOT upc DOT de> <51CF9918 DOT 5020602 AT cornell DOT edu> <op DOT wzhpt5zyofd6j1 AT nebbiolo DOT upc DOT de>
In-Reply-To: <op.wzhpt5zyofd6j1@nebbiolo.upc.de>

On 6/30/2013 7:50 AM, Helmut Karlowski wrote:
> Ken Brown, 30.06.2013 04:34:00:
>> If you want to try debugging this with gdb, the texlive-debuginfo
>> package contains the files you need.
>
> Thanks! Found the bug:
>
> In
>
> texk/web2c/luatexdir/lua/loslibext.c:649
>
> In
>
> 632     static void find_env(lua_State * L)
> 633     {
> 634         char *envitem, *envitem_orig;
> (gdb)
> 635         char *envkey;
> 636         char **envpointer;
> 637         envpointer = environ;
> 638         lua_getglobal(L, "os");
> 639         if (envpointer != NULL && lua_istable(L, -1)) {
> 640             luaL_checkstack(L, 2, "out of stack space");
> 641             lua_pushstring(L, "env");
> 642             lua_newtable(L);
> 643             while (*envpointer) {
> 644                 /* TODO: perhaps a memory leak here  */
> (gdb)
> 645                 luaL_checkstack(L, 2, "out of stack space");
> 646                 envitem = xstrdup(*envpointer);
> 647                 envitem_orig = envitem;
> 648                 envkey = envitem;
> 649                 while (*envitem != '=') {
> 650                     envitem++;
> 651                 }
> 652                 *envitem = 0;
> 653                 envitem++;
> 654                 lua_pushstring(L, envkey);
> (gdb)
> 655                 lua_pushstring(L, envitem);
> 656                 lua_rawset(L, -3);
> 657                 envpointer++;
> 658                 free(envitem_orig);
> 659             }
> 660             lua_rawset(L, -3);
> 661         }
> 662         lua_pop(L, 1);
> 663     }
>
>
> It crashes in line 649, because my shell put an item without '=' in the
> environment, and there is no 0-check in find_env(), which appears to be
> a good thing. Fixed.

I'm glad you found it.  Does the malformed environment string also 
explain the other strange errors you were seeing?

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019