Bug 472963

Summary: Broken regular expression in configure.ac
Product: [Developer tools] valgrind Reporter: Andreas F. Borchert <andreas.borchert>
Component: generalAssignee: Paul Floyd <pjfloyd>
Status: RESOLVED FIXED    
Severity: normal CC: pjfloyd
Priority: NOR    
Version First Reported In: 3.21.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.