We were able to reproduce this when compiling with GCC-9, where the fix is optimized out. I'm not sure why UBSSan doesn't flag this, but the check needs to be adjusted slightly. Thanks for the report back.
Bug 1581024 Comment 20 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
We were able to reproduce this when compiling with GCC-9, where the fix is optimized out. I'm not sure why UBSan doesn't flag this, but the check needs to be adjusted slightly. Thanks for the report back.