Bug 30637

Summary: MAKEDEV 1.243.2.36 errors in i4bteld* node creation
Product: Base System Reporter: dim <dim>
Component: i386Assignee: hm
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dim 2001-09-17 20:30:01 UTC
The /dev/MAKEDEV script (revision 1.243.2.36) seems to contain an
error in the part that creates the i4bteld* nodes. Not that I ever
use those, but with a "MAKEDEV all" at the end of a mergemaster
session, the problem is bound to surface. This leads to errors like:

dim@tensor:/dev$ sudo ./MAKEDEV all
Password:
MAKEDEV: arith: syntax error: "àÈàéëî"

bad node: mknod i4bteld1

I've also seen this problem reported many times on -stable.

Fix: I can't figure out what's precisely wrong with the MAKEDEV script, no
matter how long I stare at it. Maybe it'll come to me later. I
suspect a bug in /bin/sh or something...

However, a fix seems quite easy. Just split the i4btel line in 2
parts, and the problem goes away, at least on my box. I'm not sure
why, though. If I figure it out, I'll file another PR.
How-To-Repeat: cd /dev
sudo /bin/sh /dev/MAKEDEV all
Comment 1 dim 2001-09-18 21:37:12 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After reading some comments that this error could be due to
CPU-specific optimizations, via /etc/make.conf's CPUTYPE= setting, I
tried rebuilding the world on the problematic box, and that solved the
problem. I guess this is the proper solution, certainly after reading
the comments about CPUTYPE in make.conf, and this PR can therefore be
closed.

However, it's still strange that /bin/sh exhibits this bug when using
CPU-specific optimizations, and only for this specific script (but of
course there could be more problems waiting to be ran into). Even
stranger is the "fix" that I submitted in this PR, which seems to work
for me and some other people.

Is an optimization problem such as this worth the trouble of finding
out why it fails (quite tricky, I guess)?

Cheers,
- --
Dimitry Andric <dim@xs4all.nl>
PGP Key: http://www.xs4all.nl/~dim/dim.asc
Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i
Comment: http://www.gn.apc.org/duncan/stoa_cover.htm

iQA/AwUBO6eiUbBeowouIJajEQKmQwCbBRNZ+i/YVTOHwyRkjwfB8UwGyDwAnRXk
R9aZ3lx7oSNKDSvySpvIp1uU
=6IEs
-----END PGP SIGNATURE-----
Comment 2 mikko 2001-09-20 02:36:38 UTC
Looks like this is a manifestation of the bug fixed in PR 24443.
I applied the diff from expand.c to my -stable system, and MAKEDEV
stopped misbehaving.

MFC, please?

     /Mikko

 Mikko Työläjärvi_______________________________________mikko@rsasecurity.com
 RSA Security
Comment 3 hm freebsd_committer freebsd_triage 2001-11-19 14:29:26 UTC
Responsible Changed
From-To: freebsd-bugs->hm

Changed to i4b author.
Comment 4 hm 2001-11-19 14:32:44 UTC
Can somebody involved in this tell me if they still se the problem
or if it has been solved in the meantime ?

hellmuth
Comment 5 dim 2001-11-19 16:08:09 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2001-11-19 at 15:32:44 Hellmuth Michaelis wrote:

HM> Can somebody involved in this tell me if they still se the problem
HM> or if it has been solved in the meantime ?

This problem was due to a parser error in sh, see PR 24443. According
to the audit-trail of that PR, it has been fixed for at least -current
and RELENG_4.

Cheers,
- --
Dimitry Andric <dim@xs4all.nl>
PGP Key: http://www.xs4all.nl/~dim/dim.asc
Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i
Comment: http://www.gn.apc.org/duncan/stoa_cover.htm

iQA/AwUBO/kgY7BeowouIJajEQJ3PwCglbPmNGO4Y6ZLN4n1DZJoQQOZxy4AoP8f
2379Lb1SigGZOGQHX0+CFXBY
=bFbL
-----END PGP SIGNATURE-----
Comment 6 hm freebsd_committer freebsd_triage 2001-11-21 14:23:17 UTC
State Changed
From-To: open->closed

After contacting the originator of this PR, he writes: 
This problem was due to a parser error in sh, see PR 24443. According 
to the audit-trail of that PR, it has been fixed for at least -current 
and RELENG_4.