Bug 724817

Summary: gawk-4.0.0 regression in '\' escape handling in gsub()
Product: [Fedora] Fedora Reporter: John Ellson <john.ellson>
Component: gawkAssignee: Martin Bříza <mbriza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: ismail, mbriza, vvitek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-28 03:20:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 808005    

Description John Ellson 2011-07-21 21:42:26 UTC
Description of problem:
gawk-4.0.0 regression in '\' escape handling in gsub()

gawk-3.1.8 works ok.

Version-Release number of selected component (if applicable):
gawk-4.0.0-1.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. echo '\\' | gawk '{gsub("\\\\","\\\\",$0); print($0);}'
2.
3.

Actual results:
\\

Expected results:
\\\\

Additional info:
This breaks the ~20 year old stringize.awk script in graphviz that converts
postscript text into C strings.

This problem has also been reported by email to bug-gawk of problem:

Comment 1 İsmail Dönmez 2011-09-27 11:36:06 UTC
This is fixed upstream, see http://git.savannah.gnu.org/cgit/gawk.git/diff/?id=16de770359370224129f23df745178efe518c02c

Comment 2 Martin Bříza 2012-06-06 13:19:48 UTC
The component has changed its owner to me, so I'm assigning the bug to myself.

Comment 3 Fedora Update System 2012-06-07 12:06:18 UTC
gawk-4.0.1-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/gawk-4.0.1-1.fc17

Comment 4 Fedora Update System 2012-06-07 12:07:39 UTC
gawk-4.0.1-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/gawk-4.0.1-1.fc16

Comment 5 Fedora Update System 2012-06-07 22:55:42 UTC
Package gawk-4.0.1-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gawk-4.0.1-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9014/gawk-4.0.1-1.fc16
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-06-28 03:20:19 UTC
gawk-4.0.1-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-06-28 03:34:55 UTC
gawk-4.0.1-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.