Bug 472963 - Broken regular expression in configure.ac
Summary: Broken regular expression in configure.ac
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.21.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-03 15:53 UTC by Andreas F. Borchert
Modified: 2023-08-17 20:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas F. Borchert 2023-08-03 15:53:45 UTC
SUMMARY
***
A version in hex is read out using dis under Solaris but the regular expression does not accept hex digits
***

In line 4514 of configure.ac you will find following line which is relevant for Solaris:

   hex=$( $DIS_PATH -F scf_handle_bind $libscf  | perl -pe '($_) = /0x(?:4d01)?526570(\d{2}),/' )

This is capturing the last two digits. However “\d” is given where hex digits may appear. Hence ”\d” is to be replaced by “[0-9a-f]”. 

Observed under Solaris 11.4 on a x86-64 platform.
Comment 1 Paul Floyd 2023-08-06 17:07:52 UTC
I’ll see what I get on Solaris 11.3
Comment 2 Paul Floyd 2023-08-17 20:11:24 UTC
commit 991bf3789a828e60c24776a1cd2f8271255596bc
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Thu Aug 17 22:05:47 2023 +0200

    Bug 472963 - Broken regular expression in configure.ac
    
    Was extracting the last two decimal digits from a hex humber.
    
    I switched to using grep and sed because the proposed solution
    didn't work on Solaris 11.3.