Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The goal of science is to build better mousetraps. The goal of nature is to build better mice.


devel / comp.unix.shell / Problem with type system in ksh - Memory fault(coredump)

SubjectAuthor
* Problem with type system in ksh - Memory fault(coredump)Janis Papanagnou
`* Re: Problem with type system in ksh - Memory fault(coredump)Martijn Dekker
 `* Re: Problem with type system in ksh - Memory fault(coredump)Janis Papanagnou
  `- Re: Problem with type system in ksh - Memory fault(coredump)Martijn Dekker

1
Problem with type system in ksh - Memory fault(coredump)

<tgeo66$1pv2j$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5712&group=comp.unix.shell#5712

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Problem with type system in ksh - Memory fault(coredump)
Date: Wed, 21 Sep 2022 12:14:29 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <tgeo66$1pv2j$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Sep 2022 10:14:31 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="f63be7a6905d8465f8d0b30452d2c451";
logging-data="1899603"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+9WgZWfAyTF9eJ+5rTjdc"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:NTmOaMBcMxFPd4sQLZ98VduVIb0=
Content-Language: en-US
 by: Janis Papanagnou - Wed, 21 Sep 2022 10:14 UTC

In my daily work I'm rarely using types (typeset -T) with ksh.
Currently I'm playing around with it and stumbled across an error.

I get the error in version sh (AT&T Research) 93u+ 2012-08-01
and as well in 93u+m (alpha) that I have installed here.

(Note: The reproducible problem arises in a larger, more complex
program; I was unable to reduce the program and still get that
error, specifically the excerpt below does not trigger it, but I
use it to explain the changes [in the larger program] that made
the coredump problem go away.)

#!/usr/bin/ksh

typeset -T Coord_t=( typeset -i x=0 ; typeset -i y=0)
enum State_t=( Active Pending Finished )
enum Dir_t=( N S W E )

typeset -T Job_t=(
State_t state
Coord_t pos
Dir_t from
)

The problem seems to only appear if one of the enum-types (Dir_t
or State_t) is the first entity in the Job_t structure. Having
the Coord_t entity first will not trigger that "Memory fault" and
everything works smoothly.

Has anyone observed that behavior/bug as well and can share any
experiences or insights? (I'm reluctant to continue using types
since it might be an unreliable feature.)

Janis

Re: Problem with type system in ksh - Memory fault(coredump)

<jp3hk3F36shU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5713&group=comp.unix.shell#5713

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mart...@inlv.demon.nl (Martijn Dekker)
Newsgroups: comp.unix.shell
Subject: Re: Problem with type system in ksh - Memory fault(coredump)
Date: Thu, 22 Sep 2022 18:42:42 +0200
Lines: 16
Message-ID: <jp3hk3F36shU1@mid.individual.net>
References: <tgeo66$1pv2j$1@dont-email.me>
Reply-To: martijn@inlv.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 8S7dIJq/gl5feyq6tsWTwAAyXAGbWxiJdh4xCeC+/fppoNGmI=
Cancel-Lock: sha1:e4Qn/g7yX+4tXMPreK9t0zYfmGw=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.3.0
Content-Language: en-GB
In-Reply-To: <tgeo66$1pv2j$1@dont-email.me>
 by: Martijn Dekker - Thu, 22 Sep 2022 16:42 UTC

Op 21-09-22 om 12:14 schreef Janis Papanagnou:
> (Note: The reproducible problem arises in a larger, more complex
> program; I was unable to reduce the program and still get that
> error, specifically the excerpt below does not trigger it,

In order to trace the problem I will need a reproducer that actually
triggers the crash. Please email me or file a bug at github.

--
|| modernish -- harness the shell
|| https://github.com/modernish/modernish
||
|| KornShell lives!
|| https://github.com/ksh93/ksh

Re: Problem with type system in ksh - Memory fault(coredump)

<tgicc0$29kme$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5714&group=comp.unix.shell#5714

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Problem with type system in ksh - Memory fault(coredump)
Date: Thu, 22 Sep 2022 21:17:20 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <tgicc0$29kme$1@dont-email.me>
References: <tgeo66$1pv2j$1@dont-email.me> <jp3hk3F36shU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 22 Sep 2022 19:17:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5bc70f6d34348d6ece6e2c02e8da97cf";
logging-data="2413262"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qlnet5Qj9b08M8lmKe7dG"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:JOn0JHQs/5RDQOg1NZGkLPxajzU=
In-Reply-To: <jp3hk3F36shU1@mid.individual.net>
Content-Language: en-US
 by: Janis Papanagnou - Thu, 22 Sep 2022 19:17 UTC

On 22.09.22 18:42, Martijn Dekker wrote:
> Op 21-09-22 om 12:14 schreef Janis Papanagnou:
>> (Note: The reproducible problem arises in a larger, more complex
>> program; I was unable to reduce the program and still get that
>> error, specifically the excerpt below does not trigger it,
>
> In order to trace the problem I will need a reproducer that actually
> triggers the crash. Please email me or file a bug at github.

Thank you for asking! - I've just sent you a shell script by email.

Janis

Re: Problem with type system in ksh - Memory fault(coredump)

<jp6o4vFiif0U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5715&group=comp.unix.shell#5715

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mart...@inlv.demon.nl (Martijn Dekker)
Newsgroups: comp.unix.shell
Subject: Re: Problem with type system in ksh - Memory fault(coredump)
Date: Fri, 23 Sep 2022 23:52:31 +0200
Lines: 18
Message-ID: <jp6o4vFiif0U1@mid.individual.net>
References: <tgeo66$1pv2j$1@dont-email.me> <jp3hk3F36shU1@mid.individual.net>
<tgicc0$29kme$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net y8lhcQbxiHs7oNwXItr7Pgcrl5yiLjp+2C3MRuPrFlSlRsL4o=
Cancel-Lock: sha1:Kwcs7W2SV/t3C0AB9iwd98qNBUc=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.3.0
Content-Language: en-GB
In-Reply-To: <tgicc0$29kme$1@dont-email.me>
 by: Martijn Dekker - Fri, 23 Sep 2022 21:52 UTC

Op 22-09-22 om 21:17 schreef Janis Papanagnou:
> On 22.09.22 18:42, Martijn Dekker wrote:
>> In order to trace the problem I will need a reproducer that actually
>> triggers the crash. Please email me or file a bug at github.
>
> Thank you for asking! - I've just sent you a shell script by email.

The search for a fix is on at: https://github.com/ksh93/ksh/issues/537

--
|| modernish -- harness the shell
|| https://github.com/modernish/modernish
||
|| KornShell lives!
|| https://github.com/ksh93/ksh

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor