diff options
author | Alexander Bokovoy <ab@redhat.com> | 2023-04-24 14:29:49 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-04-27 07:21:33 +0000 |
commit | 60f9396a7d2211b55d3d91196561678a9f9f6942 (patch) | |
tree | 4991af1e21652e06e1161a1ac4a9b744f3b2890f /buildtools | |
parent | b5e9c2bc0ed5d24aa994a3f278e31aba4d4f58a6 (diff) | |
download | samba-60f9396a7d2211b55d3d91196561678a9f9f6942.tar.gz |
wafsamba: Normalize strings in gdb output when comparing ABI
This fixes an issue with gdb >= 13:
libndr.so: symbol ndr_transfer_syntax_ndr64 has changed
old_signature: uuid = {
time_low = 1903232307,
time_mid = 48826,
time_hi_and_version = 18743,
clock_seq = "\203\031",
node = "\265\333\357\234\314\066"
}, if_version = 1
new_signature: uuid = {
time_low = 1903232307,
time_mid = 48826,
time_hi_and_version = 18743,
clock_seq = "\203\031",
node = "\265\333\357\234\3146"
}, if_version = 1
\314\066 and \3146 are the same as \066 translates into the char '6'. In order
to address this we should do byte comparison in python.
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Alexander Bokovoy <ab@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_abi.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 6a8e4bcef00..682f4e897b5 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -42,7 +42,8 @@ def normalise_signature(sig): def normalise_varargs(sig): '''cope with older versions of gdb''' sig = re.sub(r',\s\.\.\.', '', sig) - return sig + # Make sure we compare bytes and not strings + return bytes(sig, encoding='utf-8').decode('unicode_escape') def parse_sigs(sigs, abi_match): |