Project

General

Profile

Actions

Bug #13938

closed

csh misbehaves after 13527

Added by Andy Fiddaman almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

Following 13257, csh sometimes misbehaves when being used as a script interpreter. Some examples:

% LD_PRELOAD_32=/usr/lib/extendedFILE.so.1 /bin/csh /bin/which ls
#!: Command not found
#: Command not found
#: Command not found
#: Command not found
#: Command not found
Badly placed ()'s
bloody:illumos:master% LD_PRELOAD=/lib/libumem.so UMEM_DEBUG=default,verbose /bin/csh /bin/which
#!: Command not found
#: Command not found
#: Command not found
#: Command not found
#: Command not found
Badly placed ()'s

The LD_PRELOAD seems to be a common trigger..

This turns out to be the uninitialised intact variable in main. Prior to 13257, this was a global therefore initialised to zero.
Fixing this results in the previously seen errors no longer occurring:

bloody:illumos:master% LD_PRELOAD_32=/usr/lib/extendedFILE.so.1 i386/csh /bin/which ls
/usr/bin/ls
bloody:illumos:master% LD_PRELOAD=/lib/libumem.so UMEM_DEBUG=default,verbose i386/csh /bin/which
/usr/bin/ls

Related issues

Related to illumos gate - Bug #13527: csh: multiply-defined symbolsClosedToomas Soome

Actions
Actions #1

Updated by Andy Fiddaman almost 2 years ago

  • Description updated (diff)
Actions #2

Updated by Andy Fiddaman almost 2 years ago

  • Related to Bug #13527: csh: multiply-defined symbols added
Actions #3

Updated by Andy Fiddaman almost 2 years ago

  • Subject changed from csh misbehaves after 13257 to csh misbehaves after 13527
Actions #4

Updated by Electric Monk almost 2 years ago

  • Gerrit CR set to 1598
Actions #5

Updated by Electric Monk almost 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 390ca21a12b3e3353546a4293f926ef7eef449d9

commit  390ca21a12b3e3353546a4293f926ef7eef449d9
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-07-13T13:46:59.000Z

    13938 csh misbehaves after 13527
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Klaus Ziegler <klausz@haus-gisela.de>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF