Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\ubsan.c Create Date:2022-07-28 07:22:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__ubsan_handle_shift_out_of_bounds

Proto:void __ubsan_handle_shift_out_of_bounds(struct shift_out_of_bounds_data *data, void *lhs, void *rhs)

Type:void

Parameter:

TypeParameterName
struct shift_out_of_bounds_data *data
void *lhs
void *rhs
358  rhs_type = rhs_type
359  lhs_type = lhs_type
362  ua_flags = user_access_save()
364  If suppress_report( & location) Then Go to out
367  ubsan_prologue( & location)
369  val_to_string(rhs_str, size of rhs_str , rhs_type, rhs)
370  val_to_string(lhs_str, size of lhs_str , lhs_type, lhs)
372  If val_is_negative(rhs_type, rhs) Then pr_err("shift exponent %s is negative\n", rhs_str)
375  Else if get_unsigned_val(rhs_type, rhs) >= type_bit_width(lhs_type) Then pr_err("shift exponent %s is too large for %u-bit type %s\n", rhs_str, type_bit_width(lhs_type), type_name)
381  Else if val_is_negative(lhs_type, lhs) Then pr_err("left shift of negative value %s\n", lhs_str)
384  Else pr_err("left shift of %s by %s places cannot be represented in type %s\n", lhs_str, rhs_str, type_name)
390  ubsan_epilogue()
391  out :
392  user_access_restore(ua_flags)