develooper Front page | perl.perl5.porters | Postings from December 2010

[perl #80264] PATCH: New regcomp.c build warnings

Thread Next
From:
karl williamson
Date:
December 5, 2010 15:23
Subject:
[perl #80264] PATCH: New regcomp.c build warnings
Message ID:
rt-3.6.HEAD-13564-1291591400-802.80264-75-0@perl.org
# New Ticket Created by  karl williamson 
# Please include the string:  [perl #80264]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=80264 >




-------- Original Message --------
'make' in blead is now producing the following build warnings:

regcomp.c: In function `Perl_re_compile':
regcomp.c:4390: warning: variable 'exp' might be clobbered by
`longjmp' or `vfork'
regcomp.c:4391: warning: variable 'xend' might be clobbered by
`longjmp' or `vfork'
regcomp.c:4383: warning: argument 'pm_flags' might be clobbered by
`longjmp' or `vfork'

The first two were introduced by:

commit 5b6010b3c3f40e7db51b877d5227c4c80caaa5bb
Author: Yves Orton <demerphq@gmail.com>
Date:   Sat Dec 4 15:26:38 2010 +0100

    make empty string regexp stringify to the same thing regardless of
unicode flags

And the last one comes from:

commit 7b597bb8ab6914a0dfcb8d6fb5c4ca99855e5762
Author: Karl Williamson <public@khwilliamson.com>
Date:   Fri Dec 3 08:54:37 2010 -0700

     regcomp.c: Move code out of longjump area

     This code should be done before the setjump to avoid the longjump
     clobbering it.
-------

The attached patch should fix this.  I need to reread the longjmp manual 
page everytime I do something with it, 'cause I keep forgetting. 
Another lesson here is to at least compile with optimization on, before 
submitting changes to this routine.  The messages don't show up in my 
normal workspace which doesn't have optimization on.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About