-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stage2, uefi: allocate untyped buffers from tagged region
This addresses a long-standing bug in targets that use a rewind tag for values (specifically the stage2 and uefi bootloaders), whereby an untyped buffer allocation was being allocated without creating space for the tag type. This could manifest in an incorrect tag type being read for a buffer. To remedy this, an additional tagged region heap is created of type tag_unknown, and untyped buffer values (currently only coming from decode_value() when using an old TFS encoding for backward compatibility) are allocated from that heap.
- Loading branch information
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,5 @@ static inline value_tag tagof(value v) | |
return tag_integer; | ||
return *((u8 *)v-1); | ||
} | ||
|
||
extern heap boot_buffer_heap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters