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:
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
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.
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 #
Sorry, I've overlooked the architecture ;-( I'm able to preproduce this bug on x86_64. Thanks!
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.
Yes, I can confirm gawk-3.1.4-5.4 solved this bug. Thanks! P.S.: Could you specify the reason of the bug?
The reason has been wrong types in the random routines.