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; |
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 |
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); |
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 |
-- 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. |
Segmentation fault at address 0x3e800033cc6 | |
/home/user/dev/git/zi/zig/master/build/stage3/lib/zig/std/os/linux/x86_64.zig:36:5: 0x22d97c in syscall2 | |
(stacking_panics) | |
return asm volatile ("syscall" | |
^ | |
/home/user/dev/git/zi/zig/master/build/stage3/lib/zig/std/os/linux.zig:991:49: 0x20f19f in nanosleep (sta | |
cking_panics) | |
return syscall2(.nanosleep, @ptrToInt(req), @ptrToInt(rem)); | |
^ | |
/home/user/dev/git/zi/zig/master/build/stage3/lib/zig/std/os.zig:5253:39: 0x20b681 in nanosleep (stacking |
/* aeabi.h - declares the ARM run-time helper-function ABI for programs written in C. | |
* | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* In jurisdictions that recognize copyright laws, the author or authors |