aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-cmd-exception.py
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-10-08 11:53:10 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2025-10-08 14:57:57 -0400
commit4cab44595eed299ec196902a54710be2fd224083 (patch)
tree372d88a43eb76a9d3f8d233ac6d42cb8ac351a31 /gdb/testsuite/gdb.python/py-cmd-exception.py
parentc1950dcc04c07e713b708efcf1c6cc88eda60843 (diff)
downloadbinutils-4cab44595eed299ec196902a54710be2fd224083.zip
binutils-4cab44595eed299ec196902a54710be2fd224083.tar.gz
binutils-4cab44595eed299ec196902a54710be2fd224083.tar.bz2
gdb/python: cast to ui_file_style::intensity after validating value
When GDB is built with undefined behavior sanitizer, gdb.python/py-style.exp fails because of this: $ ./gdb -q -nx --data-directory=data-directory -ex "python filename_style = gdb.Style('filename')" -ex "python filename_style.intensity = -3" /home/simark/src/binutils-gdb/gdb/python/py-style.c:239:11: runtime error: load of value 4294967293, which is not a valid value for type 'intensity' Fix it by casting the value to ui_file_style::intensity only after validating the raw value. Change-Id: I38eb471a9cb3bfc3bb8b2c88afa76b8025e4e893 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.python/py-cmd-exception.py')
0 files changed, 0 insertions, 0 deletions