Bug 174551 - Regular expressions fail if srand() is used.
Summary: Regular expressions fail if srand() is used.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: 4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-29 22:16 UTC by Milan Simanek
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-22 22:16:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
chroot with all files (1.15 MB, application/x-gzip)
2006-02-22 21:14 UTC, Milan Simanek
no flags Details

Description Milan Simanek 2005-11-29 22:16:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050111

Description of problem:
When srand() is used in BEGIN action, then regular expression pattern will not fire its action for no input line.

Version-Release number of selected component (if applicable):
gawk-3.1.4-5

How reproducible:
Always

Steps to Reproduce:
echo good|gawk 'BEGIN {srand();}; /o/ {print "OK";}'


  

Actual Results:  none

Expected Results:  OK


Additional info:

Comment 1 Karel Zak 2006-02-21 15:45:07 UTC
I'm not able to reproduce this bug.

# echo good|gawk 'BEGIN {srand();}; /o/ {print "OK";}'
OK

# rpm -q gawk
gawk-3.1.4-5.3


Comment 2 Milan Simanek 2006-02-22 21:14:53 UTC
Created attachment 125058 [details]
chroot with all files

This archive contains all files necessary to reproduce the bug.
You need also x86_64 architecture and 2.6 kernel.

Untar it and run "./run_me" script.

Comment 3 Milan Simanek 2006-02-23 00:16:00 UTC
The bug has been reached on system with kernel 2.6.14-1.1653_FC4,
cpuinfo:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 47
model name      : AMD Athlon(tm) 64 Processor 3500+
stepping        : 0
cpu MHz         : 2211.340
cache size      : 512 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow
pni lahf_lm
bogomips        : 4427.41
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc



# ldd /usr/bin/gawk
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003fd8d00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003fd8b00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003fd8800000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003fd8600000)
# rpm -qf /lib64/libdl.so.2
glibc-2.3.5-10
glibc-2.3.5-10.3
# rpm -qf /lib64/libm.so.6
glibc-2.3.5-10
glibc-2.3.5-10.3
# rpm -qf /lib64/libc.so.6
glibc-2.3.5-10
glibc-2.3.5-10.3
# rpm -qf /lib64/ld-linux-x86-64.so.2
glibc-2.3.5-10
glibc-2.3.5-10.3
#


Comment 4 Karel Zak 2006-02-23 14:40:30 UTC
Sorry, I've overlooked the architecture ;-( I'm able to preproduce this bug on
x86_64. Thanks!

Comment 5 Fedora Update System 2006-02-24 16:10:44 UTC
From User-Agent: XML-RPC

gawk-3.1.4-5.4 has been pushed for FC4, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 6 Milan Simanek 2006-03-01 08:38:15 UTC
Yes, I can confirm gawk-3.1.4-5.4 solved this bug.
Thanks!

P.S.: Could you specify the reason of the bug?

Comment 7 Karel Zak 2006-03-22 22:16:53 UTC
The reason has been wrong types in the random routines.


Note You need to log in before you can comment on or make changes to this bug.