Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
// zig run acl_min.zig | |
pub const DWORD = c_ulong; | |
pub const HANDLE = ?*anyopaque; | |
pub const PVOID = ?*anyopaque; | |
pub const PSID = PVOID; | |
pub const PSECURITY_DESCRIPTOR = PVOID; | |
pub const enum__SE_OBJECT_TYPE = c_uint; | |
pub const SE_OBJECT_TYPE = enum__SE_OBJECT_TYPE; | |
pub const wchar_t = c_ushort; | |
pub const SE_FILE_OBJECT: c_int = 1; |
1. nix + arcan | |
2. QubesOS for VMs. | |
3. EndeavourOS | |
4. Windows with minimal installer | |
5. MacOS no idea. |
Dear llvm folks, I have some questions on the status or plan for the LLVM memory model semantics regarding pointers and it would be nice, if you can give me pointers where to look for answers. | |
Context: "PNVI-ae-udi tracks (1) ambiguities in provenance and (2) provenance exposure whereas VIP | |
does not. On the other hand, (3) VIP tracks provenance in integers (in a limited way, for round-trip | |
casts) whereas PNVI-ae-udi does not, and (4) VIP relies on the copy_alloc_id primitive, which is | |
not available in PNVI-ae-udi.". https://iris-project.org/pdfs/2022-popl-vip.pdf | |
1. As far as understand, temporal (undereferenced) out of bounds pointers are also not forced to be UB in contrast to C. Is that correct and would the llvm model them to allow this use case? | |
2. From what I understand, the one past the end ambiguous provenance of pointers originates from pointer that were casted to integers losing their provenance. Is there some decision or discussion what llvm is doing or will do and/or if user annotation is planne |
use_nix |
#!/usr/bin/env sh | |
git clone --depth=1 https://github.com/DragonFlyBSD/DragonFlyBSD | |
git clone --depth=1 https://github.com/freebsd/freebsd-src | |
git clone --depth=1 https://fuchsia.googlesource.com/fuchsia | |
git clone --depth=1 https://github.com/haiku/haiku | |
git clone --depth=1 https://github.com/hermitcore/rusty-hermit | |
git clone --depth=1 https://github.com/Stichting-MINIX-Research-Foundation/minix/ | |
git clone --depth=1 https://github.com/NetBSD/src | |
git clone --depth=1 https://github.com/openbsd/src |
Incomplete list of safety shortcomings in POSIX shell | |
NEVER leave your variables unquoted. | |
https://unix.stackexchange.com/questions/171346/security-implications-of-forgetting-to-quote-a-variable-in-bash-posix-shells | |
And variables with common prefixes without braces. | |
https://stackoverflow.com/questions/8748831/when-do-we-need-curly-braces-around-shell-variables | |
Always clean up your environment to prevent stack smashing. | |
https://github.com/netblue30/firejail/issues/3678 | |
Better use `test [expression]` and dont dare to ask why |
fn openAndRead(alloc: std.mem.Allocator, in_file: []const u8) !void { | |
var f = std.fs.cwd().openFile(in_file, .{}) catch |err| { | |
fatal("unable to open file '{s}': {s}\n", .{ in_file, @errorName(err) }); | |
}; | |
defer f.close(); | |
const stat = try f.stat(); | |
if (stat.size > std.math.maxInt(u32)) | |
return error.FileTooBig; | |
const source = try alloc.allocSentinel(u8, @intCast(usize, stat.size), 0); | |
errdefer alloc.free(source); |
-- Simplified version only taking into account idenically sized splits | |
-- along a full rectangle: | |
-- Windows can be grouped by following the direction of window numbers. | |
-- 1. 2. 3. | |
-- 1 | 2 | | |1 |2 | | | 6 | 1 | 2 | 3 | 4| | |
-- ---|---| 5 | |-----| 4 | 5 |---- |--------------| | |
-- 3 | 4 | | | 3 | | | 7 | 5 | | |
-- 1. allowed, because even though 5 has no split, it has full height | |
-- 2. not allowed, because 3 has no vsplit | |
-- 4. not allowed, because splits in 1,2 are not identical in 3. |
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig | |
index 8004f94d7f..22996939a3 100644 | |
--- a/lib/std/Thread.zig | |
+++ b/lib/std/Thread.zig | |
@@ -275,6 +275,14 @@ pub fn getCurrentId() Id { | |
return Impl.getCurrentId(); | |
} | |
+pub fn getStatus() c_int { | |
+ // https://stackoverflow.com/questions/9577231/how-to-check-the-state-of-linux-threads |