loader: disk io should not use alloca()
The BIOS version of the loader needs to use low memory with BIOS interrupts. Since the current loader code+data+stack is in low memory (0xa000 - value from 0x413), with small code base the alloca() was quite ok. However, as the feature list has grown in time, it has become clear the alloca() is not something we can use, because it provides no way to validate the allocation. Unfortunately there are only limited options left right now. As an alternate, we have free page (4KB), which will provide us an safe area.
Updated by Electric Monk almost 4 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
commit 560b2482e2c940112b49e908c56ce8a4860f3f9b Author: Toomas Soome <firstname.lastname@example.org> Date: 2017-02-09T15:51:56.000Z 7847 loader: disk io should not use alloca() Reviewed by: Jason King <email@example.com> Reviewed by: Richard Lowe <firstname.lastname@example.org> Reviewed by: Yuri Pankov <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>