| 1 |
# Date: Sat, 30 Mar 1996 12:47:17 -0800 (PST) |
| 2 |
# From: Charles Howes <[email protected]> |
| 3 |
# To: [email protected], [email protected] |
| 4 |
# Subject: Bug in Gawk 3.0.0, sample code: |
| 5 |
# |
| 6 |
#!/usr/local/bin/gawk -f |
| 7 |
# |
| 8 |
# Hello! This is a bug report from [email protected] |
| 9 |
# |
| 10 |
# uname -a |
| 11 |
# SunOS hostname 5.5 Generic sun4m |
| 12 |
# |
| 13 |
# Gnu Awk (gawk) 3.0, patchlevel 0: |
| 14 |
BEGIN{ |
| 15 |
FS=":" |
| 16 |
while ((getline < "/etc/passwd") > 0) { |
| 17 |
r=$3 |
| 18 |
z=0 |
| 19 |
n[0]=1 |
| 20 |
} |
| 21 |
FS=" " |
| 22 |
} |
| 23 |
#gawk: fp.new:16: fatal error: internal error |
| 24 |
#Abort |
| 25 |
|
| 26 |
# #!/usr/local/bin/gawk -f |
| 27 |
# # Gnu Awk (gawk) 2.15, patchlevel 6 |
| 28 |
# |
| 29 |
# BEGIN{ |
| 30 |
# f="/etc/passwd" |
| 31 |
# while (getline < f) n[0]=1 |
| 32 |
# FS=" " |
| 33 |
# } |
| 34 |
# #gawk: /staff/chowes/bin/fp:7: fatal error: internal error |
| 35 |
# #Abort |
| 36 |
|
| 37 |
# These examples are not perfect coding style because I took a real |
| 38 |
# piece of code and tried to strip away anything that didn't make the error |
| 39 |
# message go away. |
| 40 |
# |
| 41 |
# The interesting part of the 'truss' is: |
| 42 |
# |
| 43 |
# fstat(3, 0xEFFFF278) = 0 |
| 44 |
# lseek(3, 0, SEEK_SET) = 0 |
| 45 |
# read(3, " r o o t : x : 0 : 1 : S".., 2291) = 2291 |
| 46 |
# brk(0x00050020) = 0 |
| 47 |
# brk(0x00052020) = 0 |
| 48 |
# read(3, 0x0004F4B8, 2291) = 0 |
| 49 |
# close(3) = 0 |
| 50 |
# Incurred fault #6, FLTBOUNDS %pc = 0x0001B810 |
| 51 |
# siginfo: SIGSEGV SEGV_MAPERR addr=0x00053000 |
| 52 |
# Received signal #11, SIGSEGV [caught] |
| 53 |
# siginfo: SIGSEGV SEGV_MAPERR addr=0x00053000 |
| 54 |
# write(2, " g a w k", 4) = 4 |
| 55 |
# write(2, " : ", 2) = 2 |
| 56 |
# |
| 57 |
# -- |
| 58 |
# Charles Howes -- [email protected] Voice: (604) 691-1607 |
| 59 |
# System Administrator Fax: (604) 691-1605 |
| 60 |
# Internet Direct - 1050 - 555 West Hastings St - Vancouver, BC V6B 4N6 |
| 61 |
# |
| 62 |
# A sysadmin's life is a sorry one. The only advantage he has over Emergency |
| 63 |
# Room doctors is that malpractice suits are rare. On the other hand, ER |
| 64 |
# doctors never have to deal with patients installing new versions of their |
| 65 |
# own innards! -Michael O'Brien |
| 66 |
# |
| 67 |
# "I think I know what may have gone wrong in the original s/w. |
| 68 |
# It's a bug in the way it was written." - Vagueness**n |