Skip to contentSkip to conversation

DASH regression

DISCUSSION Brian Koropoff 2 participants 2 messages Jun 16, 2010 – Jul 5, 2010

lore
Share & tools
lore
#0 lore raw

Hello,
I encountered a regression in DASH from git while attempting to get
it working on Solaris. I got it to build and run, but my scripts were mysteriously failing. I tracked it down to a logic bug in setvareq() that caused it to assign through the wrong pointer when attempting to remove a variable from its hash bucket. The following test case reproduces the bug for me:

--

#!/bin/dash
GDM_LANG="bar"
OPTION="foo"
unset GDM_LANG
# OPTION has mysteriously become unset
echo "$OPTION"

--

I'll follow up with a patch.

Regards,
Brian Koropoff

#1 lore raw
Quoted 7 lines · Brian Koropoff

Hello,
I encountered a regression in DASH from git while attempting to get
it working on Solaris. I got it to build and run, but my scripts were mysteriously failing. I tracked it down to a logic bug in setvareq() that caused it to assign through the wrong pointer when attempting to remove a variable from its hash bucket. The following test case reproduces the bug for me:

Thanks for the report. I'll apply your patch.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt