[ELF] << >>: make RHS less than 64
The left/right shift linker script operators may trigger UB. E.g. in linkerscript/end-overflow-check.test, the initial REGION1__PADDED_SR_SHIFT is uint64_t(-3), cause the following expression to trigger an out-of-range shift in a ubsan build of lld. REGION1__PADDED_SR_SIZE = MAX(1 << REGION1__PADDED_SR_SHIFT, 32); Protect such UBs by making RHS less than 64.
Loading
Please sign in to comment