-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
defaultPanic: @trap on 'other' target
The freestanding and other OS targets by default need to just @trap in the default Panic implementation. And `isValidMemory` won't work with freestanding or other targets. Update the unwind_freestanding.zig test case to also run on the 'other' OS target, too. This should keep the Zig's stacktrace generation from regressing on the standalone targets.
- Loading branch information
Showing
4 changed files
with
9 additions
and
7 deletions.
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
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ noinline fn frame0(expected: *[4]usize, unwound: *[4]usize) void { | |
frame1(expected, unwound); | ||
} | ||
|
||
// Freestanding entrypoint | ||
// No-OS entrypoint | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
alexrp
Member
|
||
export fn _start() callconv(.C) noreturn { | ||
var expected: [4]usize = undefined; | ||
var unwound: [4]usize = undefined; | ||
|
@@ -50,8 +50,9 @@ export fn _start() callconv(.C) noreturn { | |
} | ||
} | ||
|
||
// Need to compile as "freestanding" to exercise the StackIterator code, but when run as a | ||
// regression test need to actually exit. So assume we're running on x86_64-linux ... | ||
// Need to compile with the target OS as "freestanding" or "other" to | ||
// exercise the StackIterator code, but when run as a regression test | ||
// need to actually exit. So assume we're running on x86_64-linux ... | ||
asm volatile ( | ||
\\movl $60, %%eax | ||
\\syscall | ||
|
What is the reason why you replaced Freestanding with No-OS?
Do No-OS refers to https://wiki.analog.com/resources/no-os ?
Thanks.