Skip to content

rts/linker: Fix out-of-bounds mapping logic

Ben Gamari requested to merge wip/linker-fixes into master

Previously the structure of mmapInRegion concealed a subtle bug concerning handling of mmap returning mappings below the beginning of the desired region. Specifically, we would reset p = result + bytes and then again reset p = region->start before looping around for another iteration. This resulted in an infinite loop on FreeBSD.

Fixes #25492 (closed).

Merge request reports

Loading