bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash bug --- 1st parameter substitued for /InstallShield/ that is passed


From: david bone
Subject: Bash bug --- 1st parameter substitued for /InstallShield/ that is passed to the main entry pt of program
Date: Mon, 15 Sep 2008 12:49:04 -0700

cdbone root 15:08 540 $: bash -version
GNU bash, version 3.00.16(1)-release (i386-pc-solaris2.10) running on an AMD 
dual core machine
Copyright (C) 2004 Free Software Foundation, Inc.
cdbone root 15:23 541 $: 

The bash problem:
The parameters passed to the ``main entry'' of a program substitutes the first 
parameter "/*hi*/" which is a c++ type comment as /InstallShield/
The following bash command line demonstrates this runtime behavior :

cdbone root 15:03 539 $: /yacco2/bin/o2linker_debug  /*hi*/ 
/yacco2/compiler/grammars/yacco2.fsc /*there*/
                                                                              
^p1-^ ^--------------p2-------------------------------------^ ^--p3---^ // not 
outputted: just annotated comment for your eyes
O2linker version:1.1
Load linker's keywords 
Get command line and parse it 
p:1 /InstallShield/
p:2 /yacco2/compiler/grammars/yacco2.fsc
p:3 /*there*/
Error in file#: 1 "linkercmd.tmp"
/InstallShield/ /yacco2/compiler/grammars/yacco2.fsc /*there*/ 
                ^
        fpos: 16 line#: 1 cpos: 17
        who thru it: /yacco2/compiler/grammars/o2_linker_opts.cpp line#: 95 
state no: 10
        command line chaffe

cdbone root 14:55 534 $: uname -a  
SunOS cdbone 5.10 Generic_118855-14 i86pc i386 i86pc
cdbone root 14:55 535 $: hostname
cdbone root 15:02 538 $: whoami
root

Some Comments:
Removing the first comment works fine.
cdbone root 15:03 539 $: /yacco2/bin/o2linker_debug  
/yacco2/compiler/grammars/yacco2.fsc /*there*/

This problem is not serious as most programs that i know of do not support this 
type of option. 
As i am developing a compiler/compiler, i use this approach for my programs to 
comment my regression tests. I just wanted to bring this oddity to your 
attention and possibly include it in your bash documentation. 

On an aside, I'm curious: are u using /InstallShield/ and for what purposes? 
Dave Bone




reply via email to

[Prev in Thread] Current Thread [Next in Thread]